Using Dateadd function adding day,month,year in date

Posted on May 14, 2008. Filed under: Sql Server |

select

dateadd(datepart,number,date)
eg-

select

DATEADD(month, 3, getdate()) 

Datepart

|Abbreviations
year| yy,yyyy 
quarter| qq,
month| mm,
dayofyear| dy,
day| dd,
week| wk,ww 
weekday| dw,
hour| hh
minute| mi,
second| ss, s

Make a Comment

Make A Comment: ( None so far )

blockquote and a tags work here.

    About

    Hi,I am Suresh Sharma(MCP) from Gorakhpur , UP, India.I have work on .net technology from 2 years. Key skills-Asp.net 2.0,3.5, Sql 2005,2000. Ajax.net 1.1,C#.net

    RSS

    Subscribe Via RSS

    • Subscribe with Bloglines
    • Add your feed to Newsburst from CNET News.com
    • Subscribe in Google Reader
    • Add to My Yahoo!
    • Subscribe in NewsGator Online
    • The latest comments to all posts in RSS
    • Subscribe in Rojo

    Meta

Liked it here?
Why not try sites on the blogroll...