M
mp80237
Hello,
I am connected with view only access to a SQL database. I am running
my queries needed through access. The dates/times in the SQL database
are formated 12 hour time and the date is included in the field. I
just use the time (Example: 1/4/2006 12:06:00 PM). In what I need it
to do I created time fields and converted the date/time to military
time using the TimeValue function (Example: StartTime:
TimeValue([iStartDate])). What I want is my end value of all my time
fields put together in this format:
13:36-13:38MDT/20:36-20:38:43GMT/4:36-4:38HKG/06:36-06:38SYD
But my query that is putting the times together is putting the times
back to 12 hour clock:
1:36 PM-1:38PMMDT/8:36 PM-8:38PMGMT/4:36 AM-4:38AMHKG/6:36 AM-6:38AMSYD
Here is my original code:
Outage: [StartTime] & "-" & [EndTime] & "MDT/" & [StartGMT] & "-" &
[EndGMT] & "GMT/" & [StartHK] & "-" & [EndHK] & "HKG/" & [StartSyd] &
"-" & [EndSyd] & "SYD"
Here is my code I tried and the results were the same:
Outage: (TimeValue([StartTime])) & "-" & (TimeValue([EndTime])) &
"MDT/" & (TimeValue([StartGMT])) & "-" & (TimeValue([EndGMT])) & "GMT/"
& (TimeValue([StartHK])) & "-" & (TimeValue([EndHK])) & "HKG/" &
(TimeValue([StartSyd])) & "-" & (TimeValue([EndSyd])) & "SYD"
Any ideas to get it to the military time without the AM/PM? Thanks for
the help!
I am connected with view only access to a SQL database. I am running
my queries needed through access. The dates/times in the SQL database
are formated 12 hour time and the date is included in the field. I
just use the time (Example: 1/4/2006 12:06:00 PM). In what I need it
to do I created time fields and converted the date/time to military
time using the TimeValue function (Example: StartTime:
TimeValue([iStartDate])). What I want is my end value of all my time
fields put together in this format:
13:36-13:38MDT/20:36-20:38:43GMT/4:36-4:38HKG/06:36-06:38SYD
But my query that is putting the times together is putting the times
back to 12 hour clock:
1:36 PM-1:38PMMDT/8:36 PM-8:38PMGMT/4:36 AM-4:38AMHKG/6:36 AM-6:38AMSYD
Here is my original code:
Outage: [StartTime] & "-" & [EndTime] & "MDT/" & [StartGMT] & "-" &
[EndGMT] & "GMT/" & [StartHK] & "-" & [EndHK] & "HKG/" & [StartSyd] &
"-" & [EndSyd] & "SYD"
Here is my code I tried and the results were the same:
Outage: (TimeValue([StartTime])) & "-" & (TimeValue([EndTime])) &
"MDT/" & (TimeValue([StartGMT])) & "-" & (TimeValue([EndGMT])) & "GMT/"
& (TimeValue([StartHK])) & "-" & (TimeValue([EndHK])) & "HKG/" &
(TimeValue([StartSyd])) & "-" & (TimeValue([EndSyd])) & "SYD"
Any ideas to get it to the military time without the AM/PM? Thanks for
the help!