Formatting a Date Field

tcarriero
NewLounger
Posts: 15
Joined: 10 Feb 2010, 20:13

Formatting a Date Field

Post by tcarriero »

I've struggled with this far too long. Sorry but I don't know the proper terminology to use.

I have a date field which will need to be broken up later so certificates can be made out. How do I format it so January 1, 2010 will remain 01/01/2010 and not 1/1/10?

User avatar
JudyJones
StarLounger
Posts: 72
Joined: 08 Mar 2010, 13:05
Location: Manassas, VA

Re: Formatting a Date Field

Post by JudyJones »

You can create the following expression for this field in a query: Format(DateFieldName,"mm/dd/yyyy"). Replace DateFieldName with the name of your field.

tcarriero
NewLounger
Posts: 15
Joined: 10 Feb 2010, 20:13

Re: Formatting a Date Field

Post by tcarriero »

Thank you so much.
I had tried the mm/dd/yyyy format but I was putting it in the TABLE!
This is perfect - thanks again.

Mark L
3StarLounger
Posts: 331
Joined: 11 Feb 2010, 03:55
Location: Land O Lakes, FL

Re: Formatting a Date Field

Post by Mark L »

tcarriero wrote:I've struggled with this far too long. Sorry but I don't know the proper terminology to use.

I have a date field which will need to be broken up later so certificates can be made out. How do I format it so January 1, 2010 will remain 01/01/2010 and not 1/1/10?
You need to have a better understanding of Date/Time fields. They are not stored in any particular format; as a matter of fact, today's date (July 7, 2010) is stored as 40366.0! You format it at the time you use it; usually in the Format property of a textbox control on a form or a report. So, January 1, 2010 can be displayed as "January 1, 2010", or "01/01/2010" or "1/1/10" as your whim changes.
Mark Liquorman
Land O Lakes, FL
see my website http://www.liquorman.net for Access Tips and Tricks, and for my Liquorman Utilities.

tcarriero
NewLounger
Posts: 15
Joined: 10 Feb 2010, 20:13

Re: Formatting a Date Field

Post by tcarriero »

Good to know - thank you.