How to set MMM-YY is access table

JMUDALIA

New member
Local time
Yesterday, 19:03
Joined
Oct 28, 2011
Messages
2
Hi,

I am new to access and working in MS Access 2003.. I have a problem which I am not able to fix .. I am trying to get MMM-YY type of date in a Table with date format. How do I custom mask the date format.. can any one help me pls..
 
You can do this with the Format function;

Format([DateField], "mmm-yy")

but you would do this with an expression in a query field or in a control (like a text box) on a form, not in the table itself. Data entry and display is done with queries, forms and reports. You (or your users) should not be working directly in the tables.
 
Hi,

I am new to access and working in MS Access 2003.. I have a problem which I am not able to fix .. I am trying to get MMM-YY type of date in a Table with date format. How do I custom mask the date format.. can any one help me pls..

This is not totally clear. Do you want to save as mmm yy into a Table or do you want to display the contents of a table as mmm yy
 
Only valid dates can be stored in a field defined as type Date. MMM-YY is not valid. If all you have is the month and year, use the first as a default for day.
 
MS Access stores Dates as a strange Number Format. The Number is made up of two parts. The Whole Number and the Decimal. The Whole Number can be Positive or Negative dependining on the sign + or - and the Decimal is always Positive.

0.00 is 30th December 1899.
0.25 is 06:00 AM 30th December 1899 and so is -0.25
Every day or part day forward from 30th December 1899 is a Positive number represented by the Whole Number as Days and the Decimal as Hours Minutes Seconds.

January 2000 is not a date and cannot be stored in a Date Field.

If you Format a Control on a FORM as "MMM-YY" and enter Jan 2000 then the table will store the Number Equilivant of 01/01/2000.

I would advise not to format at the Table level. Do your Formating In Forms and Reports.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom