Custom date formats

S

Sue

MSAccess 97
I have an Access database with dates that will be used in
a Word mail merge. The dates need to be formatted as
mmmm dd, yyyy,
thanks for any help
 
R

Ronald Dodge

You can use the Format Function in VBA

dteDateVar = Format(<Date>,"mmmm dd, yyyy")
 
R

Ronald Dodge

Just as a little advise, most users will not reply via email and it's best
to keep all questions to the newsgroup(s). If you still have a question on
the same issue, just continue the thread on the message.

With regards to what you asked:


Thank you so much Ronald.

Do I put it in my code? Also, do I literally put in <Date> in the syntax?

Thanks ALOT

Sue

The part where I put in the <Date>, that's where your date variable goes in
like:

Dim strDateVar as String
strDateVar = Format(Date,"mmmm dd, yyyy")
MsgBox "This is what was captured in the String Variable by the Format
Function" _
& vbCR & strDateVar, 64

In the above example, the variable, 'strDateVar' is declared as a String
data type variable, and the 'Date' that in the above example is the constant
that contains the current date (which is actually the date that's on the
system). It will then pop up a message box with what's in the string
variable.
 

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