Date input mask question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do you allow any date to be entered into a text field like:
1/5/05
01/05/2005
 
pokdbz said:
How do you allow any date to be entered into a text field like:
1/5/05
01/05/2005

Don't use a mask. Access will bend over backwards to accept any entry it
can create a date from. InputMasks are terrible in most situations. Use
them very sparingly.
 
Is this a date field? You can set the format to short date, medium date,
etc.
 
I would like the short date but it has the format 1/5/2005, but I would like
1/5/05
 
Either define the exact format (using the Format function) or change your
computer's short date format in the control panel (regional settings).
 
pokdbz said:
I would like the short date but it has the format 1/5/2005, but I
would like 1/5/05

The "named" formats ("Short Date", "Medium Date", etc.), are controlled by
your regional settings in Windows Control Panel. Explicit formats like
"mm-dd-yyyy" are not affected by the regional settings.

In your case use a format of "m/d/yy".

(two lashes for using a two digit year though :)
 
I would like to use the format function. So do I just have to put m/d/yy
when I right click properties for that field and put that in for format
 
pokdbz said:
I would like to use the format function. So do I just have to put
m/d/yy when I right click properties for that field and put that in
for format

In the format *Property* you would enter that, yes. The Format() function
is a different animal altogether and is NOT what you want.
 

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

Back
Top