Dear all,
I have to convert a variable setting in "12 hours" to "24 hours". I divided the variable into v2= "time" and v3="AM/PM", and then added 12hours if v3 == "PM", but this creates a problem for the 12PM, that are converted to midnight.
The code:

The output:

I'd be grateful for any advice, thank you in advance,
Aurora
I have to convert a variable setting in "12 hours" to "24 hours". I divided the variable into v2= "time" and v3="AM/PM", and then added 12hours if v3 == "PM", but this creates a problem for the 12PM, that are converted to midnight.
The code:
The output:
I'd be grateful for any advice, thank you in advance,
Aurora
Comment