OK ... I know I have seen this trick several times over the course of the years BUT I cannot find it doing a search. Here is what I have ...
DECLARE @Month Char(2)
SET @Month = CONVERT(Char,DATEPART(Month,GetDate()))
Of course when I run this today, I am returned '1' for Jan. No Problem but I need it to be '01'.
What are the string manipulation commands that will convert this for me. Thanks!
Thanks
J. Kusch
DECLARE @Month Char(2)
SET @Month = CONVERT(Char,DATEPART(Month,GetDate()))
Of course when I run this today, I am returned '1' for Jan. No Problem but I need it to be '01'.
What are the string manipulation commands that will convert this for me. Thanks!
Thanks
J. Kusch