Change date format when using future dates

SDLevy

Registered User.
Local time
Yesterday, 17:48
Joined
Jul 1, 2002
Messages
14
Hi,

I have created letters in Access that are printed several days before they are due to be mailed. We need this lag time to get signatures and processing done.

I want the date on the letters to be closer to the date we mail them then the date we printed them.

I've come up with =DateAdd("d",7,Date())

But it prints out in the the following format: mm/dd/yy - 11/6/02

What I need is: November 6, 2002

Any help would be greatly appreciated.

Susan
 
Use the Format function to determine to way dates are stated:

Format(DateAdd("d",7,Date()),"mmmm d, yyyy")

RV
 
not there yet

Hi,

I tried putting in the syntax you suggested instead of mine and it doesn't work. It just prints: Format(DateAdd("d",7,Date()),"mmmm d, yyyy")

I tried adding a leading "=" and that didn't help either. I tried this both as a text box and as an unbound control.

What part am I missing?

Thank you,

Susan
 
If this is on a form, leave the =DateAdd("d",7,Date()) as the text box's controlsource. Put the "Long Date" option in the Format property or the "mmmm d, yyyy" string.

I.e. split the problem into two parts. Let the expression give you the date but let the text box's Format property give you the desired format.

Divide and conquer works a LOT better than monolithic solutions when that approach is at all possible. Because, you see, you can separately verify that the dates are computed correctly and then address the form issue once you get the dates right.
 
Solution Found

Hi,

I actually got this to work several days ago but we were hit by malicious gremlins and lost our Internet service until today.

I couldn't use the Long Date choice in the format until I went to the Control Panels and change Regional Settings to MMMM DD, YYYY to get rid of the day of the week setting.

I had tried to put in the MMMM DD, YYYY mask in the Format section and couldn't get the syntax right and in researching that I discovered the Contorl Panel setting which overides the Format setting.

Thank you for your assistance in pointing me in the right direction. It now works like a charm.

Susan
 

Users who are viewing this thread

Back
Top Bottom