Tuesday, September 11, 2012

Datetime manipulation examples..

to get the date in number with format yyyymmdd .
CAST(CONVERT(VARCHAR, DATEADD(DD, -1, GETDATE()), 112) AS INT) 

No comments:

Post a Comment