Date/Time issue

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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]);
 

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

Back
Top