Convert 12 hour to 12 hour time values

Use the formula below in your Lotus Formula agent to convert values for specific fields.
Lotus Formula

All the values are in 5 minute increments, but you can adjust as needed.

tmp12 := 
"5:00 AM":"5:05 AM":"5:10 AM":"5:15 AM":"5:20 AM":"5:25 AM":"5:30 AM":"5:35 AM":"5:40 AM":"5:45 AM":"5:50 AM":"5:55 AM":
"6:00 AM":"6:05 AM":"6:10 AM":"6:15 AM":"6:20 AM":"6:25 AM":"6:30 AM":"6:35 AM":"6:40 AM":"6:45 AM":"6:50 AM":"6:55 AM":
"7:00 AM":"7:05 AM":"7:10 AM":"7:15 AM":"7:20 AM":"7:25 AM":"7:30 AM":"7:35 AM":"7:40 AM":"7:45 AM":"7:50 AM":"7:55 AM":
"8:00 AM":"8:05 AM":"8:10 AM":"8:15 AM":"8:20 AM":"8:25 AM":"8:30 AM":"8:35 AM":"8:40 AM":"8:45 AM":"8:50 AM":"8:55 AM":
"9:00 AM":"9:05 AM":"9:10 AM":"9:15 AM":"9:20 AM":"9:25 AM":"9:30 AM":"9:35 AM":"9:40 AM":"9:45 AM":"9:50 AM":"9:55 AM":
"10:00 AM":"10:05 AM":"10:10 AM":"10:15 AM":"10:20 AM":"10:25 AM":"10:30 AM":"10:35 AM":"10:40 AM":"10:45 AM":"10:50 AM":"10:55 AM":
"11:00 AM":"11:05 AM":"11:10 AM":"11:15 AM":"11:20 AM":"11:25 AM":"11:30 AM":"11:35 AM":"11:40 AM":"11:45 AM":"11:50 AM":"11:55 AM":
"12:00 PM":"12:05 PM":"12:10 PM":"12:15 PM":"12:20 PM":"12:25 PM":"12:30 PM":"12:35 PM":"12:40 PM":"12:45 PM":"12:50 PM":"12:55 PM":
"1:00 PM":"1:05 PM":"1:10 PM":"1:15 PM":"1:20 PM":"1:25 PM":"1:30 PM":"1:35 PM":"1:40 PM":"1:45 PM":"1:50 PM":"1:55 PM":
"2:00 PM":"2:05 PM":"2:10 PM":"2:15 PM":"2:20 PM":"2:25 PM":"2:30 PM":"2:35 PM":"2:40 PM":"2:45 PM":"2:50 PM":"2:55 PM":
"3:00 PM":"3:05 PM":"3:10 PM":"3:15 PM":"3:20 PM":"3:25 PM":"3:30 PM":"3:35 PM":"3:40 PM":"3:45 PM":"3:50 PM":"3:55 PM":
"4:00 PM":"4:05 PM":"4:10 PM":"4:15 PM":"4:20 PM":"4:25 PM":"4:30 PM":"4:35 PM":"4:40 PM":"4:45 PM":"4:50 PM":"4:55 PM":
"5:00 PM":"5:05 PM":"5:10 PM":"5:15 PM":"5:20 PM":"5:25 PM":"5:30 PM":"5:35 PM":"5:40 PM":"5:45 PM":"5:50 PM":"5:55 PM":
"6:00 PM":"6:05 PM":"6:10 PM":"6:15 PM":"6:20 PM":"6:25 PM":"6:30 PM":"6:35 PM":"6:40 PM":"6:45 PM":"6:50 PM":"6:55 PM":
"7:00 PM":"7:05 PM":"7:10 PM":"7:15 PM":"7:20 PM":"7:25 PM":"7:30 PM":"7:35 PM":"7:40 PM":"7:45 PM":"7:50 PM":"7:55 PM":
"8:00 PM":"8:05 PM":"8:10 PM":"8:15 PM":"8:20 PM":"8:25 PM":"8:30 PM":"8:35 PM":"8:40 PM":"8:45 PM":"8:50 PM":"8:55 PM":
"9:00 PM":"9:05 PM":"9:10 PM":"9:15 PM":"9:20 PM":"9:25 PM":"9:30 PM":"9:35 PM":"9:40 PM":"9:45 PM":"9:50 PM":"9:55 PM":
"10:00 PM":"10:05 PM":"10:10 PM":"10:15 PM":"10:20 PM":"10:25 PM":"10:30 PM":"10:35 PM":"10:40 PM":"10:45 PM":"10:50 PM":"10:55 PM":
"11:00 PM":"11:05 PM":"11:10 PM":"11:15 PM":"11:20 PM":"11:25 PM":"11:30 PM":"11:35 PM":"11:40 PM":"11:45 PM":"11:50 PM":"11:55 PM":
"12:00 AM":"12:05 AM":"12:10 AM":"12:15 AM":"12:20 AM":"12:25 AM":"12:30 AM":"12:35 AM":"12:40 AM":"12:45 AM":"12:50 AM":"12:55 AM":
"1:00 AM":"1:05 AM":"1:10 AM":"1:15 AM":"1:20 AM":"1:25 AM":"1:30 AM":"1:35 AM":"1:40 AM":"1:45 AM":"1:50 AM":"1:55 AM":
"2:00 AM":"2:05 AM":"2:10 AM":"2:15 AM":"2:20 AM":"2:25 AM":"2:30 AM":"2:35 AM":"2:40 AM":"2:45 AM":"2:50 AM":"2:55 AM":
"3:00 AM":"3:05 AM":"3:10 AM":"3:15 AM":"3:20 AM":"3:25 AM":"3:30 AM":"3:35 AM":"3:40 AM":"3:45 AM":"3:50 AM":"3:55 AM":
"4:00 AM":"4:05 AM":"4:10 AM":"4:15 AM":"4:20 AM":"4:25 AM":"4:30 AM":"4:35 AM":"4:40 AM":"4:45 AM":"4:50 AM":"4:55 AM";

tmp24 := 
"05:00":"05:05":"05:10":"05:15":"05:20":"05:25":"05:30": "05:35": "05:40":"05:45":"05:50":"05:55":
"06:00":"06:05":"06:10":"06:15": "06:20": "06:25":"06:30":"06:35":"06:40":"06:45":"06:50":"06:55": 
"07:00":"07:05":"07:10":"07:15":"07:20":"07:25":"07:30":"07:35":"07:40":"07:45":"07:50":"07:55": 
"08:00":"08:05":"08:10":"08:15":"08:20":"08:25":"08:30":"08:35":"08:40":"08:45":"08:50":"08:55":
"09:00":"09:05":"09:10":"09:15":"09:20": "09:25":"09:30": "09:35":"09:40":"09:45":"09:50":"09:55": 
"10:00":"10:05":"10:10":"10:15":"10:20":"10:25":"10:30":"10:35":"10:40":"10:45":"10:50":"10:55": 
"11:00": "11:05": "11:10":"11:15":"11:20":"11:25":"11:30":"11:35":"11:40":"11:45":"11:50":"11:55": 
"12:00":"12:05":"12:10":"12:15":"12:20":"12:25":"12:30": "12:35":"12:40": "12:45":"12:50":"12:55": 
"13:00":"13:05": "13:10":"13:15":"13:20":"13:25":"13:30":"13:35":"13:40":"13:45":"13:50":"13:55": 
"14:00":"14:05":"14:10":"14:15": "14:20":"14:25":"14:30":"14:35":"14:40":"14:45":"14:50":"14:55": 
"15:00":"15:05":"15:10": "15:15":"15:20":"15:25":"15:30":"15:35":"15:40": "15:45":"15:50": "15:55": 
"16:00":"16:05":"16:10":"16:15":"16:20":"16:25":"16:30":"16:35":"16:40":"16:45":"16:50":"16:55": 
"17:00":"17:05":"17:10":"17:15": "17:20":"17:25": "17:30":"17:35":"17:40":"17:45":"17:50":"17:55": 
"18:00":"18:05":"18:10":"18:15":"18:20":"18:25":"18:30":"18:35":"18:40":"18:45":"18:50": "18:55": 
"19:00": "19:05":"19:10":"19:15":"19:20": "19:25":"19:30":"19:35":"19:40":"19:45":"19:50":"19:55": 
"20:00":"20:05":"20:10":"20:15":"20:20":"20:25":"20:30":"20:35": "20:40":"20:45":"20:50":"20:55": 
"21:00":"21:05":"21:10":"21:15":"21:20":"21:25": "21:30":"21:35":"21:40":"21:45":"21:50":"21:55": 
"22:00": "22:05":"22:10":"22:15": "22:20":"22:25": "22:30":"22:35":"22:40":"22:45":"22:50":"22:55": 
"23:00":"23:05":"23:10":"23:15":"23:20":"23:25":"23:30":"23:35":"23:40":"23:45":"23:50":"23:55": 
"00:00":"00:05":"00:10":"00:15":"00:20":"00:25":"00:30":"00:35":"00:40":"00:45":"00:50":"00:55": 
"01:00":"01:05":"01:10":"01:15":"01:20": "01:25":"01:30":"01:35": "01:40":"01:45":"01:50":"01:55": 
"02:00":"02:05":"02:10":"02:15":"02:20":"02:25":"02:30":"02:35":"02:40":"02:45":"02:50":"02:55": 
"03:00": "03:05":"03:10":"03:15":"03:20":"03:25":"03:30":"03:35":"03:40": "03:45":"03:50":"03:55": 
"04:00":"04:05":"04:10":"04:15":"04:20":"04:25":"04:30":"04:35":"04:40":"04:45":"04:50":"04:55";

FIELD StartTimeField := @Replace( StartTimeField ; tmp12; tmp24);
FIELD EndTimeField := @Replace( EndTimeField ; tmp12; tmp24);

Written by fbrefere001

Posted by fbrefere001 on Thursday June 6, 2019