I want to get an entire date
So today would be 7/7/2010 12:00:00 am to 7/7/2010 11:59:59 pm
So that should be the full 24 hours since 12:00:00 am would be the 8th then.
So I have this
select DATEADD(??, ??, DATEDIFF(dd, 0, GETUTCDATE()))
How do I make it add 23 hours 59mins and 59seconds to it?
DECLARE @start DATETIME
DECLARE @end DATETIME
SET @start = DATEADD(dd, 0, DATEDIFF(dd, 0, GETUTCDATE()))
SET @end = DATEADD(dd, 1, DATEADD(ms, -3, @start))
Try this:
DATEADD(second, -1, DATEADD(DAY, 1,"7/7/2010 12:00:00"))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With