I'd like to format type double, format %tchh:MM:SS_AM data to be HH:MM AM and HH:MM PM. That is, I'd like to change time data that shows seconds to just show hours and minutes (e.g. 7:59:59 AM to 8:00 AM). When I use the code below, it just cuts off the seconds instead of rounding correctly to the nearest minute.
Second question is how can I change all "AM" to "PM" in end_time?
format start_time %tchh:MM_AM
format end_time %tchh:MM_AM
replace end_time = subinstr(end_time,"AM","PM",.)
*Error: "type mismatch"
Second question is how can I change all "AM" to "PM" in end_time?
format start_time %tchh:MM_AM
format end_time %tchh:MM_AM
replace end_time = subinstr(end_time,"AM","PM",.)
*Error: "type mismatch"
Comment