[AccessD] Military Time

Charlotte Foust cfoust at infostatsystems.com
Wed Apr 27 12:14:44 CDT 2005


When I enter date and time separately, I always use a text field on the
*form* for time to avoid problems and control the format.  Sorry I
didn't specify.  If you are trying to use this on a table, you can't.
However, you can use the Short Time format, which is 17:00.  Then all
you need do on a form is use "00:00" for the format string.  Access
short time won't let you enter 2400, which has to be converted to 0000
hours in the form.

Charlotte Foust


-----Original Message-----
From: Hollis,Virginia [mailto:HollisVJ at pgdp.usec.com] 
Sent: Wednesday, April 27, 2005 9:12 AM
To: accessd at databaseadvisors.com
Subject: [AccessD] Military Time


Does the field have to be text? I put it as Date/Time & it keeps saying
the value entered is not valid for this field.
 
Thanks for the help.
Virginia
 
*********************
You can use an input mask of 0000;0;"_" to force them to enter the value
in military time and use a validation rule to prevent anything below
0000 or above 2400, but that's as far as it goes.  Since you and Access
can't read minds, you have no way of knowing whether they meant 0100 or
1300 hours, so they are responsible for entering it right.
 
Charlotte Foust
 

 

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list