date in string

  • Thread starter Thread starter Jean-Paul
  • Start date Start date
J

Jean-Paul

Hi,
What is the correct syntax to write something like:

Next visit: 11/11/08

Where "Next visit:" is a string
11/11/08 comes from a date-field on a form...

I thought it was someting with # but I can't remember

Thanks
JP
 
Hi Jean-Paul

The best way to convert a date to a string is to use the Format function.
For example,

"Next visit: " & Format( [DateFieldName], "d mmm yyyy" )
will give
Next visit: 12 Nov 2008

Check the online help for the Format function to see what options you have
for formatting codes.
 

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

Similar Threads

Getting a nice layout 1
Help with code 1
Help with code 1
Drag date to increment by 7 days 3
DATE/TIME MATH ISSUE!!!! 2
Text Box Populated With Wrong Column 27
Find then highlight in yellow 6
Start Date + 7 5

Back
Top