Date and Time

  • Thread starter Thread starter miloann2002
  • Start date Start date
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
 
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
 
Back
Top