Hi, You need to check with your submitted data as in which format it is. Try with different combination for splitting the string (include -, / while splitting string). If input string works with split then assume input string as in above format. Otherwise simple, consider it as in timestamp. But I suggest if some user is entering the date then let them insert the date as you want. Just mention (mm/dd/yyyy) after the text field and it will solve your problem Warm Regards, Sanjeev http://www.sanchanworld.com/ http://webdirectory.sanchanworld.com -----Original Message----- From: OOzy Pal [mailto:oozypal@xxxxxxxxx] Sent: Monday, August 06, 2007 5:22 PM To: PHP Subject: Check if var has a date (timestamp or regular) How can I check an inputed date if it is a valid date and if it is in the form of a timestamp or regular date such as (22-07-2007 or 22/07/2007) -- OOzy Ubuntu-Feisty -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php