removing spaces

  • Thread starter Thread starter John
  • Start date Start date
J

John

I have a query that has a date and time field. What I would like to do is
read the only the date, for example; 11/12/2008 12:34:67pm. I tried this
test1: left([orderdate1], 10) and I would get back something like 11/12/2008
1. So what I would like to do is read up to the space.
 
Try to not use a text/string function (Left()) on a numeric or date
field/value. If you want the date part only, use the DateValue() function to
set the time part to 0.
 
I have a query that has a date and time field. What I would like to do is
read the only the date, for example; 11/12/2008 12:34:67pm. I tried this
test1: left([orderdate1], 10) and I would get back something like 11/12/2008
1. So what I would like to do is read up to the space.

Your working too hard.
DisplayDateOnly:DateValue([DateField])

or you could use

DisplayDateOnly:Format([DateField],"mm/dd/yyyy")
 
Back
Top