CDate time format

Hi guys,

I wanted to know how to use this date and time format from cdate, mdate, etc.

2021-01-29T08:00:07-06:00

How do you get the time? Not sure how this format works. I’m sure I can extract them but not sure how I can convert them to a more readable format.

Hi,

The example date/time you provided can be translated as January 29, 2021 8:00 AM (plus seven seconds, Central Standard Time). The date/time format used by the ActiveCampaign API is ISO 8601 format. The format looks like this:

YYYY-MM-DDThh:mm:ss+TZ

Where each component is:

 YYYY = four-digit year
 MM   = two-digit month (01=January, etc.)
 DD   = two-digit day of month (01 through 31)
 hh   = two digit hour (00 through 23)
 mm   = two digit minute (00 through 59)
 ss   = two digit second (00 through 59)
 TZ   = time zone designator (+hh:mm or -hh:mm)