rkemunto Posted February 14, 2006 Share Posted February 14, 2006 Does anyone know how I can plug in 01/31/2006 into datepart below:Select RTRIM(CONVERT(Char(01),DATEPART(month,GETDATE())))+"/"+RTRIM(CONVERT(Char(01,)DATEPART(day,GETDATE())))+"/"+RTRIM(CONVERT(Char(2006),DATEPART(year,GETDATE()))) Link to comment Share on other sites More sharing options...
trial Posted February 22, 2006 Share Posted February 22, 2006 Does anyone know how I can plug in 01/31/2006 into datepart below:Select RTRIM(CONVERT(Char(01),DATEPART(month,GETDATE())))+"/"+RTRIM(CONVERT(Char(01,)DATEPART(day,GETDATE())))+"/"+RTRIM(CONVERT(Char(2006),DATEPART(year,GETDATE())))<{POST_SNAPBACK}> -i am not getting u what exactly u asking and there is some syntax error in ur above stmt...........and i also used ' instead " because i am working in MS SQL SERVER........................Select RTRIM(CONVERT(Char(2),DATEPART(month,GETDATE())))+'/'+RTRIM(CONVERT(Char(2),DATEPART(day,GETDATE())))+'/'+RTRIM(CONVERT(Char(4),DATEPART(year,GETDATE()))) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now