Home Forums SQL Server 2008 SQL Server Newbies convert month name to month number RE: convert month name to month number
AppSup_dba
SSCrazy
Points: 2215
More actions
May 7, 2010 at 3:04 am
#1163884
how abt this?
declare @month datetime
set @month = 'apr'+'1 2010'
SELECT DATEPART(MONTH, @month)
Cheers,,,
Cheers