Skip to content

Instantly share code, notes, and snippets.

@NaserKhoshfetrat
Created May 28, 2018 09:00
Show Gist options
  • Save NaserKhoshfetrat/0e29bf3d86c2c58c82c58067c48886dc to your computer and use it in GitHub Desktop.
Save NaserKhoshfetrat/0e29bf3d86c2c58c82c58067c48886dc to your computer and use it in GitHub Desktop.
sql get date
declare @endDateTime datetime = cast(getdate() + 1 as date);
declare @startDateTime datetime = DATEADD(dd, 1, DATEDIFF(dd, 0, GETDATE())) ;
set @endDateTime= dateadd(second, 86399, @endDateTime)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment