Is there a way for me to use the Datepart function so that it would return today's date as:
20060619
Or is there another way I can do it?
The below didn't quite get me what I needed.
SELECT DATEPART(YYYY, GETDATE()), DATEPART(MM,GETDATE()) , DATEPART(DD, GETDATE())
Thanks!
That worked great, thanks!
I just realized that I pasted the wrong section into my post.
This returns the same result as Brendt's DatePart/Cast example, but with less function calls:
SELECT CONVERT(varchar,GETDATE(),112)