Query to Update Date

  • Thread starter Thread starter KLock
  • Start date Start 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.
 
UPDATE TheTable
SET TheTable.TheDateField = Int([TheDateField])
WHERE TheTable.TheDateField Is Not Null ;
 
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.
 
Back
Top