using datepart function get different output

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

selectdatepart(year,getdate())

selectdatepart(month,getdate())
select datepart(day,getdate())
select datepart(hour,getdate())
select datepart(minute,getdate())
select datepart(second,getdate())
select datepart(millisecond,getdate())
select datepart(weekday,getdate())
select datepart(dayofyear,getdate())
select datepart(quarter,getdate())

Make a Comment

Make a Comment: ( None so far )

blockquote and a tags work here.

    About

    Hi,I am Suresh Sharma 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...