Forum Discussion
Luuk_Hessing
May 18, 2021Copper Contributor
Formatting 2-digit year in MS Access. How?
 I need a 2-digit year notation and a 2-digit month notation from a date field.  Using the helppage of Ms Access the 2-digit month notation wasn't much of a problem after "mm" behind notation and usin...
- May 19, 2021Hello Gustav,
And that was the way to do it. The option you referred to, I didn't realize that it was existing. Thank you very much.
Regards from the Netherlands. 
George_Hepworth
May 18, 2021Silver Contributor
Keeping in mind that what you are talking about is a FORMAT FOR DISPLAY PURPOSES, and not the actual DATE VALUE STORED, you can do this with a Format() expression wherever you need to DISPLAY that FORMATTED STRING.
Format(Month(Date), "mm") & "/" & Format(Year(Date),"yy")
or
Format(Month(Date), "mm") & "-" & Format(Year(Date),"yy")
Having done this, you are DISPLAYING a string, not a date, so beware of trying to use it for any further date logic.
Luuk_Hessing
May 18, 2021Copper Contributor
Thank you for the above information.
I still wander why it is possible to get the 2-digit month number but not the 2-digit year number.
As I wrote before the 2-digit month number wasn't a problem within Access; it's the 2-digit year that keeps on showing up as a 4-digit number. Why?
I still wander why it is possible to get the 2-digit month number but not the 2-digit year number.
As I wrote before the 2-digit month number wasn't a problem within Access; it's the 2-digit year that keeps on showing up as a 4-digit number. Why?
- George_HepworthMay 18, 2021Silver ContributorI should have been more clear. The year is a 4-digit value. To DISPLAY it as a 2 digit number, you apply the appropriate format to it.
- Luuk_HessingMay 19, 2021Copper ContributorHello George,
And that is the problem. I've checked the Access helppage for the format and the helppage suggested it was possible to get a 2-digit year number. Their instructions worked for the 2-digit month number, but not for the 2-digit year number.