format date like AAAAMMDDHHMMSS

Hello,

How can I format msdb.dbo.backupset.backup_finish_date like AAAAMMDDHHMMSS?

Thanks

Regards

bibi
bibi92Asked:
Who is Participating?
 
Éric MoreauSenior .Net ConsultantCommented:
something like this:

select left(replace(replace(replace(CONVERT(VARCHAR(26), GETDATE(), 121), '-', ''), ':', ''), ' ', ''), 14)

BTW, SQL 2012 is coming with formatting functions.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.