enter a date without leading zero month

T

TransProg

A user wants to enter dates without the leading zero in the month. Ex.
5/28/2008
The field type is Date/Time and the date is being entered on a form. How
would I set this up in a form?
Thanks.
 
K

Klatuu

Use an Input mask for the control as
99/99/0000;0;_

so if you want to put in today's date you would type
5/282008
and it would become
5/28/2008
 
T

TransProg

Thanks Klatuu! That does work. Is it possible to enter the date that way
without the slashes as well?
 
K

Klatuu

Not really, you can always use the same input mask and enter
05282008
(same number of keystrokes)
But, in either case it doesn't have any effect on how the date is stored.
All dates are stored in date/time fields as a floating point decimal number.
 
J

John W. Vinson

Thanks Klatuu! That does work. Is it possible to enter the date that way
without the slashes as well?

Well... what date would you want entered if the user typed 12308?
January 23 (1/23/08) or December 3 (12/3/08)?

It's ambiguous. You MUST give Access some unambiguous way to determine which
digit is in the month and which digit is in the day - either by typing all the
digits (012308 or 120308), or by typing the slashes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top