Date and Time

M

miloann2002

I have two fields with Date and Time. I would like to put these two fields into one. Which function will do that?

Field 1: 12/14/2012
Field 2: 20:00

and will become

Field 3: 12/14/2012 8:00 PM

Thanks
 
J

John W. Vinson

I have two fields with Date and Time. I would like to put these two fields into one. Which function will do that?

Field 1: 12/14/2012
Field 2: 20:00

and will become

Field 3: 12/14/2012 8:00 PM

Thanks

Just add them.

An Access Date/Time field is stored as a Double Float number; the integer
part, before the decimal, is the number of days since midnight, December 30,
1899; the fractional part is the fraction of a day since last night's
midnight:

?now; cdbl(now)
12/14/2012 10:37:26 PM 41257.942662037

So:

DateTime: [Datefield] + [Timefield]

will give the date and time (assuming that the two textboxes in fact contain
what you think they do...)
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com
 

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