Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 date split

Author  Topic 

desikankannan
Posting Yak Master

152 Posts

Posted - 2010-03-15 : 14:16:48
Hi,
i want to get month ( for example in front end iam passing date "15/03/2010") i wants to get current month 03 from the date
iam storing datetime format in database
how to split day,month, year from "15/03/2010"

Desikankannan

Sachin.Nand

2937 Posts

Posted - 2010-03-15 : 14:25:54
select DATEPART(MM,@yourdatefield)

PBUH
Go to Top of Page
   

- Advertisement -