get time in google apps script 1

get time in google apps script

Utilities.formatDate(date, "GMT+5:30", "HH:mm")

Here is what the above code is Doing:
1. We are using the dateutil library to parse the date string.
2. We are using the datetime library to convert the parsed date to a datetime object.
3. We are using the dateutil library to convert the datetime object to a timezone aware datetime object.
4. We are using the dateutil library to convert the timezone aware datetime object to a string.

Similar Posts