Combining two separate fields in a table or query into one - Can it be done? (1 Viewer)

THERESA MARIE LOPEZ

New member
Local time
Today, 00:58
Joined
Feb 21, 2002
Messages
5
I recently separated a field in a query into two fields. For Example:
Originally the field held date and time
such as: 01/31/02 06:30

I changed this by defining two fields in
query as:
Date: Left([OperationDateTime],8)
Time: Right([OperationDateTime],5)

This made data entry much easier for the
operators but now I find that for some
of the reports that need to be generated
from the access database program, the
date and time need to be back together in
one field.

So my question is, Is it possible to
take the two separate field (Date and
Time) and combine them into one field so
that the dates and times would look like
this:
01/31/02 06:30

By the way, I just discovered this
website! Thanks for being here!!! Its
a great resource!
 
R

Ri_ch

Guest
=[Date]&[Time]PS.I hope those aren't the actual names of your fields
 

KKilfoil

Registered User.
Local time
Yesterday, 19:58
Joined
Jul 19, 2001
Messages
336
I find it much easier to always deal with dates using the Date type provided by Access, because you can analyse/manipulate it much easier.

You can combine the values and change it to a date type as followes:

DateAndTime: DateValue([date]) + TimeValue([time])

p.s. Like Ri_ch (or Rich?), I hope you didn't use the reserved names of date and Time as fieldnames
 

THERESA MARIE LOPEZ

New member
Local time
Today, 00:58
Joined
Feb 21, 2002
Messages
5
No, I wasn't useing "Date" and "Time" as the actual field names. I was actually using OperationDate and OperationTime. Wow, you guys are great (Hope they pay you "the big bucks")! That's exactly what I needed to know and it worked perfectly. Also, thanks for the very fast response!
 

Users who are viewing this thread

Top Bottom