Hi,
I want to store time in a 12:25:30 format into the data base. But how can I validate the user input data using preg_match method. All search results I found come with time and date and the format like 10:50 AM, but I want time in 24 hour (00:00:00) format to use in further calculation. I know how to calculate such as 10:20:30 + 5:50:40 = 16:11:10.
Later on you could make it more complex, that’s just two digits followed by a colon, followed by 2 digits, another colon and another two digits. You could make it be valid number within, ie - Minutes field could never be higher than 60, etc.