0

I need formatting of date/time in this format:

set @date1 = Format(Now(),"YYYY-MM-DDThh:mm:ssZ")

Where as its not working and if I give like this - FormatDate(Now(),"YYYY-MM-DDThh:mm:ssZ"), only date is formatting.

Is there any other method where I can format time too?

I need the output format in GMT time i.e. it should be like this - 2018-10-24T06:44:37.000+0000. (yyyy-mm-ddThh:mm:ss.sssZ)

0

Did a quick test and apparently all that needed to be changed was the capitalization of the 'Y', the 'D' and the 'Z'.

Below worked for me:
set @date1 = Format(Now(),"yyyy-MM-ddThh:mm:ssz", "Date")

Which output:
2018-11-30T08:15:57-6

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.