ISO Date Conversion

Is there a way in Ignition to convert the date to ISO

10/31/21, 7:44:28 AM   >>>  2021-12-21T00:00:00-06:00

Do you mean as a sting? If so, the format would be:
"yyyy-MM-dd'T'HH:mm:ssZ"

I am using dateFormat(dateArithmetic(toDate(now(0)), -3, "days"), "yyyy-MM-dd") to get the date get the date from three days previous, but i need it ISO format to pass in an http binding. I am trying to parametrize a date for an api request but it needs to be in ISO. For now I am using a transform to add the time portion for midnight; I thought there might be a better way to go about this.

Try "yyyy-MM-dd'T'00:00:00Z"

Thank you, I didn’t see that as an option in the documentation. I thought that there were strict patterns.

1 Like