79291794

Date: 2024-12-18 16:30:42
Score: 1
Natty:
Report link

One way would be to pull out the invividual parts of the date part and reorder them to utc? Swap day and month around to required format

DECLARE @date nvarchar(50) = N'02/10/2015 14:26:48'

SELECT CONVERT(datetime, SUBSTRING(@date, 7, 4) + '-' + SUBSTRING(@date, 4, 2) + '-' + SUBSTRING(@date, 1, 2) + ' ' + SUBSTRING(@date, 12, 8))
Reasons:
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Adrian Loughman