Marcus Aurelius
asked on
How to ADD a DATE field and a TIME field to get a single DATE/TIME field..??
Experts:
My DATE field looks like this:
2008-12-11 00:00:00.000
My Time field looks like this:
1899-12-30 02:59:39.000
I would like to get this into a column:
2008-12-11 02:59:39.000
What is the syntax to use to achieve this in a single column. And yes, just to confirm the TIME field's YEAR is in fact showing 1899...
Thanks
M
My DATE field looks like this:
2008-12-11 00:00:00.000
My Time field looks like this:
1899-12-30 02:59:39.000
I would like to get this into a column:
2008-12-11 02:59:39.000
What is the syntax to use to achieve this in a single column. And yes, just to confirm the TIME field's YEAR is in fact showing 1899...
Thanks
M
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
, cast(convert(varchar(10), mydatefield, 101) + ' ' + convert(varchar(20), mytimefield, 114) as datetime)
as OrderDateTime
Thanks!