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

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -