Ask for dot net
Pages
HOME
ABOUT ME
Thursday, 26 July 2012
Get month and year from a datetime in SQL Server 2005
datepart
(
year
,
getdate
()) -
returns year in int
datepart
(
month
,
getdate
()) -
returns month in int
datename(month,getdate()) -
returns month name in string
Regards,
Prajanuranjan...
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Total Pageviews
No comments:
Post a Comment