DatePart Function

G

Guest

Can I use the DatePart Function to retrieve the date part of a date/Time
field. In other words I would just like to retrieve the date and not the
time. I tried several formats with no luck.

This does not work:
NewDate: DatePart("mm,dd,yyyy",[ARRV_TIMESTAMP])

Any help??
Thanks!
 
D

Douglas J. Steele

DatePart only returns one specific type at a time: either the month or the
day or the year. It can't return all 3.

To get the date part, use the DateValue function:

NewDate: DateValue([ARRV_TIMESTAMP])
 
J

John Vinson

Can I use the DatePart Function to retrieve the date part of a date/Time
field. In other words I would just like to retrieve the date and not the
time. I tried several formats with no luck.

This does not work:
NewDate: DatePart("mm,dd,yyyy",[ARRV_TIMESTAMP])

Any help??
Thanks!

Instead use

DateValue([ARRV_TIMESTAMP])

John W. Vinson[MVP]
 

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