Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert DatePart value to decriptive text

Status
Not open for further replies.

BonCourage

Programmer
Aug 21, 2001
24
0
0
US
I have a report title with a textbox that I want to display the current month's name.
I have set the control source as =DatePart("m",Date()).
I have also used Month(Date()) and Month(Now()).
All three of these yield the value 7, which seems correct because it is now July.
However, I want to display "July", not 7.
If I enter mmmm under Properties>Format it yields "January", not July.
If I enter =DatePart("mmmm",Date()) I get an error.

Can someone clarify what is wrong here?
 
?format(date,"mmm")
Jul

Robert Berman
Data Base consultant
Vulcan Software Services
thornmastr@yahoo.com
 
Robert,

THANK YOU!!!! It worked. As is always true, the simplist code is often the best.

Thanks again!

BonCourage
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top