Hi:
I need to format a date like this:
01/2004 -> 'MM/YYYY'
I know that I can do this...
SELECT CAST(datepart(mm,getdate()) AS VARCHAR) + '/' + CAST(datepart(yyyy,getdate()) AS VARCHAR)
but , Is there is another better solution?select right(convert(char(10), getdate(), 103), 7)|||Originally posted by joejcheng
select right(convert(char(10), getdate(), 103), 7)
Thanx a lot :D.
You save my life !!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment