Formatting a Date in an Expression

S

S Jackson

Okay, this has bugged me for a long time and I know there is a way to get
this the way I want.

I have a text box on a report. The Control Source is:

="LTCR CASE HEARINGS AS OF" & Date()

However, the report displays the date as 11/21/03 instead of written out in
full: NOVEMBER 21, 2003 (note I want the month to be all caps too). How do
I format the date when there is text in front of it. I tried changing the
format properties of the text box control but that doesn't work.

TIA
S. Jackson
 
J

Joe

Try:

"LTCR CASE HEARINGS AS OF " & UCase(MonthName(DatePart
("m", Date()), False)) & " " & DatePart("d", Date())
& ", " & DatePart("yyyy", Date())

Sometimes you have to rip the date apart and put it back
together.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top