luvtitans50
MIS
I have a date field that I need to be formatted in 2 ways:
1 - I need the field to come out as YYYYMMDD, but what I have is leaving out the '0' in the month field as:
Convert(VarChar(4), year(getdate()))+''+CONVERT(VarChar(2),Month(getdate()))+''+Convert(VarChar(2), Day(getdate())) as createdate: 2010219
2- I need the field to come out as HHMMSSNN? How can I accomplish this?
Thanks for any assistance!
1 - I need the field to come out as YYYYMMDD, but what I have is leaving out the '0' in the month field as:
Convert(VarChar(4), year(getdate()))+''+CONVERT(VarChar(2),Month(getdate()))+''+Convert(VarChar(2), Day(getdate())) as createdate: 2010219
2- I need the field to come out as HHMMSSNN? How can I accomplish this?
Thanks for any assistance!