Convert Date and Time to Zulu

Is there a math formula I can enter into a math column to convert a standard date and time column into Zulu date and time?

Thanks!

As I understand it, dates entered will always be in the local time of the user device that entered them. So to convert to GMT/Z, you would first need to know the time zone of the user, and then add or subtract the appropriate number of hours.

2 Likes

Hmm most folks will be on Eastern US time. I’m using this for an add to calendar function, it needs zulu time to add to calendar properly.

US East is GMT -4
So you should just be able to do ‘date + 4/24’

PS. I’m on my phone right now, so I haven’t tested that. But I think it should be right. I’m sure Jeff will correct me if it’s not :wink:

Ah let me try…this works for date AND time? This is how I currently have the standard date and time:

cal2

Did it, but it doesn’t look right, thought it has to be in this format:
2016-05-26T15:00:00Z

Yes, just put that formula in a math column and replace ‘date’ with the date/time column that you want to convert.

You can see in the top right how it displays:

That’s just an ISO 8601 representation of the date/time.

When I add the event to calendar its giving me 1969 as year

You’ll either have to split each component of the date out into separate columns and piece them together, or for something to try, create an IF Then column. Set it up so if date is not empty then return date. For the else, point it to any text column. This usually works to remove formatting from a number column, so hopefully it works for date too.

So the the date and time should be seperate?

No idea what that means…

You can use date math such as year(date), month(date), hour(date), etc to deconstruct the individual parts of a date. Then you can reconstruct the individual parts into your zulu/iso date format.

But I would seriously try the trick with the IF column first. The else has to be a text based column.

@Darren_Murphy if you noticed Jen’s other posts, she’s trying to get the iso format to construct a url that requires it.

2 Likes

Yeah I noticed those just before I crashed :zzz::zzz::zzz:
Was too late and was too tired to venture any further down the rabbit hole at that point…

Jen - did you manage to get the format you need by using Jeff’s suggestion?

2 Likes

Got it! Somehow that logic works…no idea how…ha. It’s displaying correctly in the Glide data editor but when I add it to calendar no its a few ours off instead of 3-5pm its adding the event from 11am-1pm.

Almost!

Did you do the date math before converting it to the ISO format?

It sounded like that was a seperate method.

The date math converts to GMT time, and then Jeff’s idea applies the correct format. So you need to do both.

1 Like

I added in the math date/time but it doesnt apply the format correctly, as you can see in the first column. The second column is straight from the regular date/time column.

cal2