I am required to find the time when SQL Service was shut down ungracefully. There is nothing in the event viewer or the SQL Logs till it restarts.
I am extracting date from this statement:The previous system shutdown at 1:30:21 PM on 3/29/2017 was unexpected.I am able to get the date via extraction and it coverts it to datetime using powershell.But when I insert that datetime into a sql table it gives the following error:
Msg 241, Level 16, State 1, Line 18Conversion failed when converting date and/or time from character string.
By opening the string in UltraEdit for Hexa characters, I get to see this:1:30:21 PM on â€Ž3/â€Ž29/â€Ž2017
I suspect this is the reason for its failurethe characters â€Ž. Not sure how to overcome this.
Any help is welcome