Is there a way in an Excel VBA macro to get the current datetime in UTC format? I can call Now() to get the current time in the local timezone; is there a generic way to then convert this to UTC?
Thanks, Jon
Is there a way in an Excel VBA macro to get the current datetime in UTC format? I can call Now() to get the current time in the local timezone; is there a generic way to then convert this to UTC?
Thanks, Jon
http://excel.tips.net/Pages/T002185%5FAutomatically%5FConverting%5Fto%5FGMT.html
There is a macro on that page with a LocalTimeToUTC method. Looks like it would do the trick. Also some formula examples if you wanted to go that route.
Edit - Another link. http://www.cpearson.com/excel/TimeZoneAndDaylightTime.aspx This page has several methods for date/time. Pick your poison. Either should do the trick, but I feel like the second is prettier. ;)