anthylon Posted April 8, 2007 Share Posted April 8, 2007 Hello there, I'm newbie on this forum. I used search before posting. But there is so many results from search query. I read a lot but... Question: Is there any function to check if variable contain valid date? Thank you! Anthylon Link to comment https://forums.phpfreaks.com/topic/46182-check-if-variable-is-date-how/ Share on other sites More sharing options...
metrostars Posted April 8, 2007 Share Posted April 8, 2007 IT depends in what format the date is entered in. IF you are checking for the same format every time, you could use eregi. Link to comment https://forums.phpfreaks.com/topic/46182-check-if-variable-is-date-how/#findComment-224542 Share on other sites More sharing options...
clown[NOR] Posted April 8, 2007 Share Posted April 8, 2007 how is the variable getting the date? from a user or made by a script? if it's from a user I would make 3 drop down menus one for month, day and year.. then it cant go wrong =) Link to comment https://forums.phpfreaks.com/topic/46182-check-if-variable-is-date-how/#findComment-224545 Share on other sites More sharing options...
anthylon Posted April 8, 2007 Author Share Posted April 8, 2007 Well I was wondering if there is something like is_numeric. It would be nice. Is not about date format. Let's say if I use any date format. Is there any shortcut? What about eregi? Can you show some example please? Thanks :-) Link to comment https://forums.phpfreaks.com/topic/46182-check-if-variable-is-date-how/#findComment-224570 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.