ISO 8601 Formula in Excel

I had to do this and then spent way more time Googling it than just writing it from scratch. Everyone seems to want to do the reverse (parse an ISO 8601), but in my case I want to create it from the current date. Here it is:


=TEXT(NOW(), "yyyy-mm-ddThh:mm:ss") & "+10:00"


NOTE: You need to manually adjust the "+10:00" at the end of that to your actual Time Zone.

I think the main issue is that Excel doesn't have a built-in function to automatically include the time zone in a formatted string, so you'll have to manually add the time zone offset.

For time zones behind UTC, you would use a minus sign (e.g., "-05:00" for Eastern Standard Time).

No comments:

Post a Comment