Help with Date Format

S

SITCFanTN

I need to force the date to be MM/DD/YY so I'm using the input mask of
0#/0#/00, but when the date displays it shows as MM/DD/YYYY, why would that
be. I've changed the input mask in my table to match what is on the data
input form. Any help you can provide is appreciated, thank you
 
K

Klatuu

The input mask does not determine how the value is displayed. It controls
how the data is entered into the control. (Note the name INPUT mask) To
define how it should display, you use the Format property. All you need to
do is type mm/dd/yy in the Format Property with no quotes.
 
B

BruceM

I think you will find that if you go to Control Panel > Regional and
Language Options (or something like that) your short date setting will be
mm/dd/yyyy. You can change it there if you like, but that will affect all
date displays that are not specifically formatted.
Input mask is for forcing the user to enter the data according to certain
criteria. Format is for choosing how the data will be displayed. I would
suggest getting rid of the input masks and setting the format property for
the text box bound to the date field either to Short Date or to mm/dd/yy.
This will allow the users to enter 8/7 for today's date. Access will assume
the current year, and will display the date (after the user exits the text
box) as 08/07/07.
 
J

John Spencer

Input mask controls how the data is input. It does not control the display
of the data after it is input. To control the display of data use the
format property.

By the way if this is a datetime field, the data is NOT being stored in any
format. The data is stored as a number.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 

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