Solved

format date like AAAAMMDDHHMMSS

Posted on 2012-03-21
1
652 Views
Last Modified: 2012-06-21
Hello,

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

Thanks

Regards

bibi
0
Comment
Question by:bibi92
1 Comment
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 37747080
something like this:

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

BTW, SQL 2012 is coming with formatting functions.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Join & Write a Comment

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now