Hello, I need to get date and time in format of 20120817133600. Tried use Convert Replace, but without success, Please help. Thank you in advance.
Aug 18 '12 at 05:42 PM
select REPLACE(REPLACE(REPLACE(replace (convert(varchar(30), GETDATE(),121), '-', ''), ' ', ''), ':', ''), '.', '')
Aug 18 '12 at 06:38 PM
Aug 18 '12 at 06:39 PM
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
Once you sign in you will be able to subscribe for any updates here
Answers and Comments
asked: Aug 18 '12 at 05:42 PM
Seen: 221 times
Last Updated: Aug 18 '12 at 06:39 PM
how to change the date format of sqlserver 2005
figure out how to flag "worked 7 consecutive days" in t sql
Handling updation of datetime column with null value
Adjust date to day-before if it is a holiday
Converting numeric to datetime
Error calling MSSql Stored Proc from WebService with DateTime
Storage of DATETIME column
convert datetime from varchar error
First day of the week as Monday
Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.Ask SQL Server Central is a community service provided by Red Gate.