mm/yy format problems

mm/yy format problems

Post by Denny G » Tue, 14 Oct 2003 13:11:44


Karen, Try this:

1. In the "Customize Regional Options" section of the
Control Panel, change the date format to M/d/yy.

2. In the format property of your date field in your
table, enter mm\/yy.

3. In the input mask property of your date field in your
table, enter 99/0000;0;#.

4. When you enter your date (08/01) enter it as 08/2001
and it will be displayed as 08/01! You must enter a four
digit year otherwise, due to the Y2K issue, it cannot
discern among 1901, 2001, and 2101 unless you do! A two
year display is only good for years 1930 - 2029. Try
entering these three different years and see what happens
after you get set up as outlined in 1 - 3.

Regards.


when
 
 
 

mm/yy format problems

Post by Steve Scha » Thu, 16 Oct 2003 02:59:07

A date is a date. The data stored by Access is the same for a date,
regardless of the format you use, which relates only to the way the
date data is displayed. A date must always have a day and a month and
a year... no option! You can't enter a date with one of these
components missing. You have a number of options to handle your
situation:
1. Enter the date with an arbitrary day, eg 1st of the month, so that
the data would be 01-Aug-01 and then your format on your form to show
as 08/01
2. Use a Text data type instead, so that entering 08/01 will show as
08/01, the problem with this approach being it will be more difficult
if you ever need to use the field for sorting or criteria
3. Have 2 separate fields for the month and year, you can arrange
them on the form so that they almost look like one textbox for data
entry, and set the format property of each to 00

- Steve Schapel, Microsoft Access MVP


when

 
 
 

mm/yy format problems

Post by Rick Brand » Sun, 19 Oct 2003 12:54:18


A DateTime is actually stored internally as a Double so no matter what you enter
if Access can translate it into a DateTime, then it will do so and that DateTime
will always have a FULL value including Year, Month, Day, and Time.

Either let it assume the year and use formatting to suppress its display or use
a Text field instead.


--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com