James Ravenswood said:
If I enter:
5/28/2012 in A1
and
02:15:45 in A2
then =A1 + A2 works just fine, but if I enter:
=5/28/2012 + 02:15:45 in a cell I get an error.
If you want to enter date and time in one cell, simply write:
5/28/2012 02:15:45
No equal sign; not plus operator. Those are elements of formulas, not
constants.
But if want to know how to write a constant formula of that form (not
recommended), write:
="5/28/2012" + "02:15:45"
It is not recommended because 5/28/2012 might be interpreted as m/d/yyyy or
d/m/yyyy, depending on the regional date form.
In this case, if the regional date form is d/m/yyyy, you would get an error.
But an ambiguous date like "1/2/2012" (intended to mean Jan 2) might simply
be misinterpreted as Feb 1.