DatePart Function

  • Thread starter Thread starter Guest
  • Start date Start date
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!
 
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])
 
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]
 
Back
Top