T
techgeek1234
I am familiar with the "GetSystemTime" function for VB Access. However, I
need to use UTC for a query parameter. I have a database in which all date
and time fields will be entered in UTC time. I need a query to give me the
past 30 days of flights. I am currently using "Now()-30" to give me this
information. However, it's off by 5 hours because I'm in EST zone. I need
to find a way to use UTC/Greenwich within the query. This doesn't seem
possible, so I tried retrieving the time I need from a form rather than using
the Now() function.
I've tried creating a txtCurrentTime field in a form, which will populate
with NowUTC time upon the Current event. Then I tried referencing that field
in the query parameter, replacing "Now()-30" with ">=([Forms]![MainForm].
[FeasibilityForm].[form].[txtCurrentTime])-30". It does not work - it gives
me a "too complex" error or run time error on other fields from the query.
Any thoughts are appreciated. I need to find a way to pull the records in an
accurate time frame, and being off 4-5 hours is not acceptable in this
scenario.
Thanks!
need to use UTC for a query parameter. I have a database in which all date
and time fields will be entered in UTC time. I need a query to give me the
past 30 days of flights. I am currently using "Now()-30" to give me this
information. However, it's off by 5 hours because I'm in EST zone. I need
to find a way to use UTC/Greenwich within the query. This doesn't seem
possible, so I tried retrieving the time I need from a form rather than using
the Now() function.
I've tried creating a txtCurrentTime field in a form, which will populate
with NowUTC time upon the Current event. Then I tried referencing that field
in the query parameter, replacing "Now()-30" with ">=([Forms]![MainForm].
[FeasibilityForm].[form].[txtCurrentTime])-30". It does not work - it gives
me a "too complex" error or run time error on other fields from the query.
Any thoughts are appreciated. I need to find a way to pull the records in an
accurate time frame, and being off 4-5 hours is not acceptable in this
scenario.
Thanks!