Posted By

hoffstein on 10/14/08


tsql DateTime

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


TSQL last second of day

 / Published in: SQL

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

  1. DATEADD(s, -1, DATEADD(d, 1, DATEADD(d, DATEDIFF(d, 0, @date), 0)))

Report this snippet  

You need to login to post a comment.