How do I change actual data from "date with exact time" to just "d

M

menard

I am trying to use date information from an access database. I am not an
Access expert by any means. All I would like to do is change a date entry
from "7/27/2009 10:37:59 AM" to just "7/27/2009" (as I do not care about the
specific time), perhaps by adding another column to a table, or through some
other mechanism. I am not just looking to reformat for display - I am
looking to change the actual data from a date and time representation to a
date only so that the data queries I am making are easier to manage. Any
help would be appreciated.

Thanks,
 
J

John W. Vinson

I am trying to use date information from an access database. I am not an
Access expert by any means. All I would like to do is change a date entry
from "7/27/2009 10:37:59 AM" to just "7/27/2009" (as I do not care about the
specific time), perhaps by adding another column to a table, or through some
other mechanism. I am not just looking to reformat for display - I am
looking to change the actual data from a date and time representation to a
date only so that the data queries I am making are easier to manage. Any
help would be appreciated.

Thanks,

To permanently and irrevokably remove the time portion from all records in
your table, run an Update query updating the field to

=DateValue([fieldname])

using your actual fieldname.

If you need to keep the time portion for future reference, you can (at some
cost in query speed) use a calculated field

JustTheDate: DateValue([fieldname])

in your query and apply your criteria to it.

It's admittedly a hassle, but you can use date only criteria in conjunction
with a date/time field if you do it right. Perhaps you could post an example
of a query that's giving you trouble if you'ld like some tips for doing so.
 
M

menard

That worked - thank you for quick and accurate recommendation.


John W. Vinson said:
I am trying to use date information from an access database. I am not an
Access expert by any means. All I would like to do is change a date entry
from "7/27/2009 10:37:59 AM" to just "7/27/2009" (as I do not care about the
specific time), perhaps by adding another column to a table, or through some
other mechanism. I am not just looking to reformat for display - I am
looking to change the actual data from a date and time representation to a
date only so that the data queries I am making are easier to manage. Any
help would be appreciated.

Thanks,

To permanently and irrevokably remove the time portion from all records in
your table, run an Update query updating the field to

=DateValue([fieldname])

using your actual fieldname.

If you need to keep the time portion for future reference, you can (at some
cost in query speed) use a calculated field

JustTheDate: DateValue([fieldname])

in your query and apply your criteria to it.

It's admittedly a hassle, but you can use date only criteria in conjunction
with a date/time field if you do it right. Perhaps you could post an example
of a query that's giving you trouble if you'ld like some tips for doing so.
 

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