Conversion of 12 Hour Clock to 24 Hour Clock in SQL Server -
select convert(time ,' 00:00:12 pm')
why doesn't above code work. make work.
for reason "00:00:00 pm" "00:59:59 pm" fails convert time :(
"1:00:00 pm" gets converted.
thanks in advance. please me out.
convert can used cast format dates understood literal specific format.
you want use parse maybe not understood literal become datetime or time (which doesn't have format). tell engine how interprrt literal type using.
check it:
select parse(' 00:00:12 pm' time using 'en-us')
Comments
Post a Comment