Posted By

danfsmith on 11/09/11


Tagged

sql date


Versions (?)

Find rows with last date of month


 / Published in: SQL
 

  1. SELECT orderid, orderdate, custid, empid
  2. FROM Sales.Orders
  3. WHERE orderdate = DATEADD(month, DATEDIFF(month, '19991231', orderdate), '19991231');

Report this snippet  

You need to login to post a comment.