Query to Update Date

K

KLock

I am looking for a function to convert a field that is Date Time (mm/dd/yyyy
hh:mm:ss). To just Date (mm/dd/yyyy). Changing the format will not work for
what I am looking for. Usually in excel I would just find month, day, and
year seperately and then combine them again. Is this function in the Access
or a more efficient way.
 
J

Jerry Whittle

UPDATE TheTable
SET TheTable.TheDateField = Int([TheDateField])
WHERE TheTable.TheDateField Is Not Null ;
 
F

fredg

I am looking for a function to convert a field that is Date Time (mm/dd/yyyy
hh:mm:ss). To just Date (mm/dd/yyyy). Changing the format will not work for
what I am looking for. Usually in excel I would just find month, day, and
year seperately and then combine them again. Is this function in the Access
or a more efficient way.

A permanent change?
Run an update query.

Back up your data first.

Update YourTable Set YourTable.DateField = DateValue([DateField])

Then change whatever data entry you are using to store just the date,
instead of the date and time, for new records added to the table.
 

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

Similar Threads

Formatting date gives bad results in query 2
Date Function in query 3
query on date 1
Date format in query export. 4
Date Calculation 1
Date Calculation 1
Date/time query 1
Date conversion 2

Top