cms9651
SSCommitted
Points: 1940
More actions
February 12, 2013 at 9:04 am
#289264
Convert string to datetime
Hello there, hope in your help.
I've this string datetime and I need convert to datetime:
31/12/2012 16:30
Can you help me?
thank you
Ed Wagner
SSC Guru
Points: 287026
February 12, 2013 at 9:06 am
#1587062
set dateformat dmy;
select CONVERT(datetime, '31/12/2012 16:30');
Tally Tables - Performance PersonifiedString Splitting with True PerformanceBest practices on how to ask questions
February 12, 2013 at 10:28 am
#1587120
thank you for help:
SET dateformat dmy;
SELECT
CONVERT (
datetime,
'31/12/2012 16:30'
);
Output:
2012-12-31 16:30:00.000
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply