Group:  Microsoft Access ยป microsoft.public.access.formscoding
Thread: date in string

Geek News

date in string
Jean-Paul <jp.dewinter[ at ]telenet.be> 11/11/2008 7:41:07 PM
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
Re: date in string
"Graham Mandeno" <Graham.Mandeno[ at ]nomail.please> 11/11/2008 8:05:11 PM
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.
--
Good Luck :-)

Graham Mandeno [Access MVP]
Auckland, New Zealand


"Jean-Paul" <jp.dewinter[ at ]telenet.be> wrote in message
news:idlSk.64657$vm.3101[ at ]newsfe08.ams2...
[Quoted Text]
> 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


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net