How can I format a date field to force a specific date format?

How can I format a date field to force a specific date format?

Post by c3BrZWxse » Mon, 20 Dec 2004 21:45:01


The Federal Aviation Administration requires a specific date format on
reports that I use Access to produce. In this format 12/19/04 must be
displayed as DEC 19, 2004. When using mmm dd, yyyy only the first letter of
the month is capitalized. Can I format the field in the table or the report
to force the format?
 
 
 

How can I format a date field to force a specific date format?

Post by Douglas J. » Mon, 20 Dec 2004 22:03:06

I don't believe it's possible through a field format, but it is using the
Format function (in conjunction with the UCase function).

Assuming you're using a query as the RecordSource for your report, add a
computed field

RptgDate: UCase(Format([MyDateField], "mmm dd, yyyy"))

(replace MyDateField with whatever the field's actually named)

--
Doug Steele, Microsoft Access MVP
http://www.yqcomputer.com/
(no e-mails, please!)





of
report

 
 
 

How can I format a date field to force a specific date format?

Post by Andi Maye » Mon, 20 Dec 2004 22:09:28

On Sun, 19 Dec 2004 04:45:01 -0800, "spkelly"



use Ucase
If you expect an answer to a personal mail, add the word "manfred" to the first 10 lines in the message
MW
 
 
 

How can I format a date field to force a specific date format?

Post by Bill » Mon, 20 Dec 2004 22:24:10

Yes you can. In the report change on Data tab "Control Source" field to
that: =UCase(Format([DateFieldName], "mmm dd, yyyy")).
DateFieldName is field which contain date. Format will give you your
desired format and UCase will change all to capital letters.
Regards,
Billy
 
 
 

How can I format a date field to force a specific date format?

Post by fred » Tue, 21 Dec 2004 02:37:52


We just went through this for you on the 9th of December.
You even responded that the reply ... UCase(Format(etc.)) worked.
Why a repeat post on exactly the same question?
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.