Left function

S

Striperon

I have a database that is a given. It has FileDate column that
contains both the date AND the time. Example:
4/7/2006 12:05:00 PM
10/11/2006 3:00:05 PM

So some cells have 8 characters on the left, some 9 and some have 10.
I need to create another column in a Make Table query that has only the
dates.

Using: Left([FileDate],9) works except it cuts off the 6 from the
months with two digits in the number. If I use 10, the single dated
months and days have the first number of the time.

Thanks for the help.
 
J

John Spencer

Try using the DateValue function. It should be able to return the date for
you.

DateValue([FileDate]) should return just the date portion
TimeValue([FileDate]) should return just the time portion
 

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