Date/Time issue

T

T Miller

I have a table that has the date and time in a field... I only want the
date, not the time. I have tried changing it to a short date, but the time
is still there. What is a fairly easy way to take the time out and leave the
date?
 
J

Jerry Whittle

One thing to remember about changing the format is that it doesn't change the
data. Formatting only changes how that data is displayed.

First off, are you really, really sure that you don't need the time either
now or in the future? Even if really sure, make a copy of the table or entire
database before running a query like so. It will remove the decimal portion
of the number. Speaking of formatting, Access stores dates and times as
numbers. The decimal portion is the time. No decimal means midnight.

UPDATE YourTable
SET YourTable.DateTimeField = CLng([DateTimeField]);
 
Top