I have a table (table1
) with StartDate, StartTime, EndTime
, all datetime2
and an OverMidnight
boolean which specifies if the EndDate
will be different (+1) from the StartDate
.
I need to move these to another table (table2
) with the columns StartDate
and an EndDate
, both need to be the datetime
type, and use StartDate
with StartTime
to get the new StartDate
and StartDate
, OverMidnight
, and EndTime
to get the EndDate
.
No matter what I have tried it gives me an error:
The conversion of a datetime2 data type to a datetime data type resulted in an out-of-range value.