TSQL last second of day


/ Published in: SQL
Save to your folder(s)

Returns the last second of the day for a given datetime value (@date).


Copy this code and paste it in your HTML
  1. DATEADD(s, -1, DATEADD(d, 1, DATEADD(d, DATEDIFF(d, 0, @DATE), 0)))

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.