Advertisement

02.15.2008 at 01:17PM PST, ID: 23167349
[x]
Attachment Details

Convert date to char(14) = YYYYMMDDHHMISS

Asked by jimhorn in MS SQL Server

What's the easiest way to convert any date to YYYYMMDDHHMISS format?

convert(char(8), getdate(), 112) for YYYYMMDD I've got

select convert(char(8), getdate(), 114)  returns HH:MI:SS with the colons

Other than just removing the colons and adding the two
TIA
-JimStart Free Trial
[+][-]02.15.2008 at 01:29PM PST, ID: 20906133

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.15.2008 at 01:38PM PST, ID: 20906242

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: MS SQL Server
Sign Up Now!
Solution Provided By: faiga16
Participating Experts: 3
Solution Grade: A
 
 
[+][-]02.15.2008 at 03:21PM PST, ID: 20906939

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.17.2008 at 10:34PM PST, ID: 20917978

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628