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.
 
Back
Top