I have a field named timecompleted that is of type varchar that holds standard time values with either " am" or " pm" after the time. The problem I'm having is that I need to convert this to military time in a Select statement.
So for example, if my time value is "2:23:44 pm" I need it to be translated to "14:23:44", etc... (which is HH:MM:SS in military time).
How would I accomplish this easily in a select statement?
EDIT: Assuming SQl Server.
If so, you can simply cast your string as TIME
Returns