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.
There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.
Once you sign in you will be able to subscribe for any updates here
Answers and Comments
Need long-form SQL discussion? SQLserverCentral.com is the place.
asked: Aug 18 '12 at 05:42 PM
Seen: 432 times
Last Updated: Aug 18 '12 at 06:39 PM
how to compare time in sqlserver2008
How to get 3 and 6 months prior date from current date?
How do you cast/convert/ or change parts of a datetime field without changing it to a varchar?
Dates are in different months
Setting prior periods based on the current date for use in stored procedure
Adding merge replication changed datetime fields to Datetime2(7)
Group by minute
Nvarchar conversion changing datetime from style 120 to 109
conversion of char data type to a datetime data type resulted in out-of-range
Is there a way to add a date and time together to get the datetime value in SQL?