Saturday, February 11, 2012

about datetime

I have to convert date such as '2006-09-21 13:27:25.077' to '20060921'

any ideas?

thanks in advance

I attempted to convert(char(8),getdate()),but result is 'Sep 21...'

I have no idea about that

|||

Problem solved!

datatime have many styles

just like convert(char(8),getdate(),112) can perform what i want

No comments:

Post a Comment