Date/Time question

J

JohnB

Hi.

In a previous thread Ive seen advice that its best to get users to enter
date and time info in one Date/Time field. What happens when you want to do a
mail merge and you need the date to appear in one place and the time in
another. Is there an easy way to separate the date and time in, say, a query
that feeds the merge?

Also, has anyone seen any good web sites giving advice on Date/Time ?

Thanks, JohnB
 
A

Allen Browne

In your query, type this into the Field row (assuming a field named
"MyDate"):
DateValue([MyDate])

Then in the next column of the query design grid, enter:
TimeValue([MyDate])

If this will actually finish up on a report in Access, you can just place
the field on the report twice. Set the Format property of one to:
Short Date
and the other to:
Short Time
 
J

JohnB

Thank you Allen. An excellent response.

Also thanks to Van T. Dinh

Cheers, JohnB

Allen Browne said:
In your query, type this into the Field row (assuming a field named
"MyDate"):
DateValue([MyDate])

Then in the next column of the query design grid, enter:
TimeValue([MyDate])

If this will actually finish up on a report in Access, you can just place
the field on the report twice. Set the Format property of one to:
Short Date
and the other to:
Short Time

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

JohnB said:
In a previous thread Ive seen advice that its best to get users to enter
date and time info in one Date/Time field. What happens when you want to
do a
mail merge and you need the date to appear in one place and the time in
another. Is there an easy way to separate the date and time in, say, a
query
that feeds the merge?

Also, has anyone seen any good web sites giving advice on Date/Time ?

Thanks, JohnB
 
Top