K
kev100 via AccessMonster.com
I have a field in a table which stores TIME....but the field HAS to be TEXT,
unfortunately
The format can be Either 24hr (e.g. 10:00 , 12:35, 13:45, etc)
or
Regular 12hr (e.g. 10:00 AM, 12:35 AM, 1:45 PM, etc).
The problem is that I have a report based on a query that will sort the
records by TIME...based on what the user inputs when prompted - the user is
prompted for a certain time...and the query will return all records created
AFTER that time (TimeCreated > TimeEnteredAtQuery)
It would be best, by far, for the user to be able to enter regular 12hr
format into the prompt (e.g. 10:05 AM or 2:06 PM)...having "mentally convert"
to 24hr will simply increase the error/hassle rate.
Currenly.....recording time in 24hr format AND entering 24hr format at the
prompt works fine...
However....when using 12hr AM/PM format to record the data AND 12 hr AM/PM
format at the prompt will ignore AM/PM.
For example. A sort that sez: "Show all records created after 10:30 PM
(TIME>"10:30PM") will only list records from 10:31 AM to 12:59 PM and 10:31
PM to 12:59 AM. It needs to only display records created from 10:31PM to 12
Midnight.
I'm presumming this mis-sort is due to the time field being TEXT.
I'm hoping that there is some coding / setting in Access that can somehow
compensate for this so that the User and enter 12hr AM/PM a the prompt and
have the query properly sort.
And...again...the time can be recorded in either 12 or 24hr format...but
unfortunately HAS to be stored as Text.
Any advice greatly appreciated.
THANKS
unfortunately
The format can be Either 24hr (e.g. 10:00 , 12:35, 13:45, etc)
or
Regular 12hr (e.g. 10:00 AM, 12:35 AM, 1:45 PM, etc).
The problem is that I have a report based on a query that will sort the
records by TIME...based on what the user inputs when prompted - the user is
prompted for a certain time...and the query will return all records created
AFTER that time (TimeCreated > TimeEnteredAtQuery)
It would be best, by far, for the user to be able to enter regular 12hr
format into the prompt (e.g. 10:05 AM or 2:06 PM)...having "mentally convert"
to 24hr will simply increase the error/hassle rate.
Currenly.....recording time in 24hr format AND entering 24hr format at the
prompt works fine...
However....when using 12hr AM/PM format to record the data AND 12 hr AM/PM
format at the prompt will ignore AM/PM.
For example. A sort that sez: "Show all records created after 10:30 PM
(TIME>"10:30PM") will only list records from 10:31 AM to 12:59 PM and 10:31
PM to 12:59 AM. It needs to only display records created from 10:31PM to 12
Midnight.
I'm presumming this mis-sort is due to the time field being TEXT.
I'm hoping that there is some coding / setting in Access that can somehow
compensate for this so that the User and enter 12hr AM/PM a the prompt and
have the query properly sort.
And...again...the time can be recorded in either 12 or 24hr format...but
unfortunately HAS to be stored as Text.
Any advice greatly appreciated.
THANKS