March 11, 2008 at 10:17 am
Jeff
It just so happens, I needed to use this today to ensure all dates were extracted the same way that had two different formats, MM/DD/YYYY or YYYY/MM/DD as the flat file was created from two different sources that I have no control over. The issue being, in order to produce a file for upload into the warehouse being utilized, the date had to be in the YYYY-MM-DD format. I adapted your post to this 'REPLACE(CONVERT(CHAR(10),CAST(dob AS DATETIME),111), '/', '-')' saving myself a case statement with numererous cast statements.
Thanks Again
Marvin Dillard
Senior Consultant
Claraview Inc
March 11, 2008 at 10:37 am
Outstanding! Nothing like positive feeback to start the day! Thanks, Marvin!
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 2 posts - 16 through 16 (of 16 total)
You must be logged in to reply to this topic. Login to reply