Changing Date to Just month and Year

B

Bryce

I have a field that contains dates. I only want the
report to show the month and year. Can i do this on an
input mask? Thanks in advance for any help.

example. Field has 12/31/2003, and I want December 2003
 
W

Wayne Morgan

Use Format.

=Format([DateField], "mmmm yyyy") for the control source
or, in the Format tab set the Format option to
mmmm yyyy

The first option won't work if the textbox has the same name as the field.
If it does change the name of the textbox to txtDateField. Make sure that
"auto correct" doesn't change the name of the field in the entry when you
change the name of the textbox.
 
S

Sugih

I have a similar problem or maybe bit different.
what I have is date variable which format changes programatically using
code. It has no problem with regular date format (dd/mm/yyyy) but when i
change it to (mm/yyyy) it goes back to (dd/mm/yyyy) upon leaving the field.
any ideas?

TIA,
Gix

Wayne Morgan said:
Use Format.

=Format([DateField], "mmmm yyyy") for the control source
or, in the Format tab set the Format option to
mmmm yyyy

The first option won't work if the textbox has the same name as the field.
If it does change the name of the textbox to txtDateField. Make sure that
"auto correct" doesn't change the name of the field in the entry when you
change the name of the textbox.

--
Wayne Morgan
MS Access MVP


Bryce said:
I have a field that contains dates. I only want the
report to show the month and year. Can i do this on an
input mask? Thanks in advance for any help.

example. Field has 12/31/2003, and I want December 2003
 
Top