Set the format property to something like:
yyyy mmm
I typically do all of my formatting in controls rather than table design.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
In a MS Access Table, how do you format the date to show only Month and Year only?
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Set the format property to something like:
yyyy mmm
I typically do all of my formatting in controls rather than table design.
Thank you dhookom for your response.
by controls do you mean, for example, in my form? If so, would I put that in text box or on the actual field? Sorry but I am new to this.
The date field is hard coded and can't be changed. But using a query you can get the format you want. Here it is:
SELECT Year(PrixDates.ValideDe) & " - " & RIGHT("00" & Month(PrixDates.ValideDe),2) AS YyyyMm
FROM PrixDates;
Appending the month to "00" makes it possible to get "01", "02", etc.
Good day, JLC.
Thank you JLCan_CDN, I will try this.
Thank you dhookom for your response.
by controls do you mean, for example, in my form? If so, would I put that in text box or on the actual field? Sorry but I am new to this.
You set the FORMAT property of the control. However, you don't want to do that on a data entry form, because you want them to enter a full date. So the way I prefer is to do it in the query my reports are based on. Using the Format function. Which is a lot easier than JLC's solution:
=Format([datefield, "mm/yyyy") Displays 03/2015
=Format([datefield, "mmm yyyy") Displays Mar 2015
=Format([datefield, "mmmm yyyy") Displays March 2015