If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
removing spaces
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. |
#2
|
|||
|
|||
removing spaces
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. -- Duane Hookom Microsoft Access MVP "John" wrote: 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. |
#3
|
|||
|
|||
removing spaces
On Tue, 25 Nov 2008 09:25:02 -0800, John wrote:
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. DisplayDateOnlyateValue([DateField]) or you could use DisplayDateOnly:Format([DateField],"mm/dd/yyyy") -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail |
Thread Tools | |
Display Modes | |
|
|