Date formats (1 Viewer)

shbond

New member
Local time
Today, 02:22
Joined
Jul 12, 2001
Messages
5
I would like to enter and display dates in the MM/YY format. ie 05/01 means May 2001. I have tried setting the format and input mask settings to various things but none of them have been successful. When I enter the date 05/01 it returns 05/01/01.
My way round it at the minute is to store the dates as text fields. This however means I cannot sort by that field.
Any help to get round this would be appreciated.
Thanks
 

Rich@ITTC

Registered User.
Local time
Today, 02:22
Joined
Jul 13, 2000
Messages
237
Hi shbond

First thing - definitely don't store dates as a text format, it will screw up any possibility of performing all sorts of calculations, sorting, etc.

In the text box concerned set the Format property to mm/yy. That's all!

HTH

Rich Gorvin
 

shbond

New member
Local time
Today, 02:22
Joined
Jul 12, 2001
Messages
5
I've tried that and yes, it works in terms of displaying only the months and years.
However I would like the users to enter the data in MM/YY format as well. If I do this with format set to MM/YY then if I enter in 09/01 (Sept 01) it stores 09/01/01 (9th Jan 01). What I really want it to store is 01/09/01 (1st Sept 01) and just display the 09/01 part.
I appreciate the pronblem with storing dates as text - that's why I want to get round it!!!!
Thanks
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 21:22
Joined
Feb 19, 2002
Messages
43,457
Please don't post the same question in multiple places. You have several answers to this question under another topic.

You are also confused about how Access stores dates internally and how they are displayed. Don't worry about how they are stored, use a format if you want them displayed in some way other than the way specified by the standard windows default format.
 

Angello Pimental

Registered User.
Local time
Today, 02:22
Joined
May 9, 2001
Messages
92
You can force a user to enter the date in the format you want by using the input mask in the properties of the text box the user is entering the date into.

HTH
Angelo
 

Users who are viewing this thread

Top Bottom