martedì 20 novembre 2012

Datetime without hours, minutes and seconds

If you need to get date from datetime:

select dateadd(dd,0,datediff(dd,0,getdate()))

If you want only date without hours, minutes and seconds:
SELECT convert(varchar, getdate(), 103) 

103 format is dd/mm/yyyy


My Two Cents ...


Nessun commento:

Posta un commento