Wednesday, September 2, 2009

Get the date without the time

PL/SQL
SELECT TRUNC(SYSDATE) --That should get you today's date


T-SQL
SELECT DATEADD(d,DATEDIFF(d,0,GETDATE()),0) --That should get you today's date

No comments: