I am trying to figure out how to handle working with ZULU Time in a database:
Time Zone and difference to Universal Time
Dealing with 2 time zones
Dealing with daylight savings time
Any input would be appreciated.
I first started out with a bunch of complex codes and I have seen some modules on the internet (just search Access vba daylight savings) however I haven't seen any code that would allow for the wims of the President, if any of you remember Bush Jr. changed the actual times in the US when DST occurs. Currently, I believe the changes occur the first 00:00 Sunday in November and the second 00:00 Sunday in March. Now you can get all clever and code that quite easily, but if it changes... your code is invalid and your converted times will be off. I now have a summer and winter front-end so that if it changes I merely change the locked for editing values on the form in question. The values come from a table I created for the sole purpose of converting Zulu to local. So for instance, Summer EST is 04:00 and Winter EST is 05:00. I set the defalut values in my form to input the values from this table and let the query the form is built on do the conversion. If I forget to push the new front end I have admin rights to change the values. If it was hard coded I would have to do that 24/7.
I feel your pain with the multiple time zones as units go TDY. I have mine set up (since I am tracking flying) with a Launch base value and a Home Station value. In this way I can still get my report to show local time even if they are flying 9 time zones away. My debrief personnel still input zulu time in the data base and the queries do the rest.
for giggles here is some code my friend came up with me to convert a date into "Air Force" julian where SCHEDDAY is my date field ( I prefer medium date for just about everything)
=IIf(DatePart("y",[SCHEDDAY])<10,Format([SCHEDDAY],"yy") & "00" & DatePart("y",[SCHEDDAY])) & IIf(DatePart("y",[SCHEDDAY])<100 And DatePart("y",[SCHEDDAY])>=10,Format([SCHEDDAY],"yy") & "0" & DatePart("y",[SCHEDDAY])) & IIf(DatePart("y",[SCHEDDAY])>=100,Format([SCHEDDAY],"yy") & DatePart("y",[SCHEDDAY]))