date and time separtion

G

Guest

Table has a field with Date/Time data type ( 09/08/2005 21:45:35 format).
I need to separate its Date and Time portions into two fields (Date Field
and Time Field). How Can I do that? Later I need to combine them again. How
Can I?
Use function or another query? Thank you. Really appreciate your help.
 
J

Joseph Meehan

Jay said:
Table has a field with Date/Time data type ( 09/08/2005 21:45:35
format). I need to separate its Date and Time portions into two
fields (Date Field and Time Field). How Can I do that? Later I need
to combine them again. How Can I?
Use function or another query? Thank you. Really appreciate your
help.

No, you don't need two new fields. You just extract - display the date
or time portion as needed.

Do you need to use the results in a calculation? If so what is the
calculation. If not just use a format property in the form, query or report
as needed. Remember that tables are for storing data so you should not
really care how it looks in the table.
 
D

Douglas J. Steele

Further to what Joseph's suggested, create a query that has all of the
fields of your table, plus two computed fields: one for the date portion of
the field, and one for the time portion of the field. To extract only the
date, you use the DateValue function, while to extract only the time, you
use the TimeValue function.

Use this query wherever you would otherwise have used 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


Top