gerkintrigg Posted March 11, 2007 Share Posted March 11, 2007 Hello all. I'm trying to use another person's javascript (I hate other peoples code normally)... It's a popup calendar that outputs to a string like this: DD/MM/YYYY My question is this: What's the easiest way of checking whether field 1 (in the format above) is before field 2 (also in the same format) using PHP's date functions? Is there an easy way of PHP asking: "if field one !< field 2 do this{ blah }" Thanks everyone! Link to comment https://forums.phpfreaks.com/topic/42243-string-to-date-function/ Share on other sites More sharing options...
Orio Posted March 11, 2007 Share Posted March 11, 2007 Look into strtotime(). Then you can compare the results. Orio. Link to comment https://forums.phpfreaks.com/topic/42243-string-to-date-function/#findComment-204913 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.