declare @fdate datetimeset @fdate = '12/20/2012'-- current month, current year, fut date-- you can change the date param with your choiceSELECT CAST(CAST(DATEPART(MONTH,GETDATE()) as varchar(2))+ '-'+ CAST( DATEPART(DAY,@fdate) as varchar(2)) +'-'+ CAST( DATEPART(YEAR,GETDATE()) as varchar(4)) as datetime) as newdate
No comments:
Post a Comment