Question : string to date

Hey

I gave a string that stores a date ( 20091211205325-032babb7). The first 4 characters are year, next 2 are month and the next 2 are day. What I want to do is change the format to MMDDYYYY and update a date column called xdate.

I cant figure out the sql statement

Answer : string to date

update tbl set xdate = left(badfield, 8)
Random Solutions  
 
programming4us programming4us