Solved

SQL Convert Date

Posted on 2013-06-10
2
255 Views
Last Modified: 2013-06-12
Hi Guys

SQL Server 2008.

I need to convert 'Tue Jun 18 10:00:00 UTC+0100 2013' to '2013-06-18 10:00:00.000'.

Any ideas

Thanks,
Shezad
0
Comment
Question by:Shezad Ahmed
2 Comments
 
LVL 22

Expert Comment

by:plusone3055
ID: 39234463
0
 
LVL 25

Accepted Solution

by:
Lee Savidge earned 500 total points
ID: 39234468
Messy but it works:

select convert(nvarchar(23), cast(substring(replace('Tue Jun 18 10:00:00 UTC+0100 2013', 'UTC+0100 ', ''), 4, 1000) as datetime), 121)
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SQL Server Select - find rows created in last 6 months 4 38
SSRS 2013 - Creating a summarized report 19 35
Webservices in T-SQL 3 31
VB.net and sql server 4 35
I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

772 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