Warning - TSQL newbie question ahead:
I've got a DateTimeOffset
for, say, 2013-03-11 11:04:26.0000000 +00:00
and I need to create two new dates for the same day, one at 00:01 and another one at 23:59.
So far I've tried various things with DATETIMEOFFSETFROMPARTS
and DATEPART
but it seems way to awkward - is there a simple solution to snip off the hours/minutes/etc. and just use the day replacing the time with the two required ones?
Any hints appreciated.