ShaolinF Posted November 22, 2009 Share Posted November 22, 2009 Hi Guys What is the best approach to validate form date/times with the following formats: DD/MM/YY and HH:MM Link to comment https://forums.phpfreaks.com/topic/182546-validating-datetime/ Share on other sites More sharing options...
cags Posted November 22, 2009 Share Posted November 22, 2009 You can use checkdate to test if you split it up first. I know theres a regex somewhere in the Regex forum for calculating valid Military time so if it's 24 hour you could use that. Theres also a rather spectacular Regex for date, but at last view I don't think we had leap years working perfectly Link to comment https://forums.phpfreaks.com/topic/182546-validating-datetime/#findComment-963497 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.