Input Mask for dates

  • Thread starter Thread starter BobRoyAce
  • Start date Start date
B

BobRoyAce

I have a text box on my form that is linked to a data field in my
datasource. I would like to specify an input mask that would allow either
single or double-digit months and days, and either two- or four-digit years.
What could I use for an InputMask to accomplish this?
 
BobRoyAce said:
I have a text box on my form that is linked to a data field in my
datasource. I would like to specify an input mask that would allow
either single or double-digit months and days, and either two- or
four-digit years. What could I use for an InputMask to accomplish
this?
You don't need an input mask.
Just format the output the way you want to see it.

9 4
09 04
9/4
9 4 4
Sep 4
sep 4 2004

all will return a good date formatted the way you want 9/4/2004.
 
I have a text box on my form that is linked to a data field in my
datasource. I would like to specify an input mask that would allow either
single or double-digit months and days, and either two- or four-digit years.
What could I use for an InputMask to accomplish this?

No Mask at all, I'd suggest. An input mask has only one function - to
constrain the user's options to the one the designer allows.

Access is pretty clever at correctly (usually correctly anyway :-{( )
parsing anything that looks like a date into a valid date/time field;
it's quite possible for the user to enter

9/5/04
09-05-2004
Sept 5
9/5
2004.09.05

and have all of them correctly converted to the same date/time value.

John W. Vinson[MVP]
(no longer chatting for now)
 
Back
Top