Date Input Mask

G

Guest

I want to enter a date like 12/04. The imput mask gives me everything but
this. How do I set the Input for just a two digit month/year?
Thanks!
 
J

John Vinson

I want to enter a date like 12/04. The imput mask gives me everything but
this. How do I set the Input for just a two digit month/year?
Thanks!

You don't. An Access Date/Time value is actually stored as a double
float number, a count of days and fractions of a day (times) since
midnight December 30, 1899. As such, any date/time value must
correspond to a precise instant of time. December 2004 was not an
instant (it was a *long* time for me... <g>)

I'd suggest either using two Integer fields, not named Month or Year
(reserved words) but something like ExpMo and ExpYr, and concatenate
them for display; or use a Text field.

John W. Vinson[MVP]
 
G

Guest

I appreciate your reply, although it was quite confusing. I entered an input
mask of 99/99 and received exactly what I wanted.
Thanks!
 
T

Tim Ferguson

I entered an input
mask of 99/99 and received exactly what I wanted.

You would be well advised to re-read John's reply. An input mask like this
will let you enter a value of "12/04" but be advised that this will be
stored as April 12th, 2005 -- which may or may not be what you want!


All the best


Tim F
 

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