RE: [PHP] Check if var has a date (timestamp or regular)

2007-08-08 Thread Sanjeev N
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

RE: [PHP] Check if var has a date (timestamp or regular)

2007-08-08 Thread Bastien Koert
Other options include using a date calendar widget (js) to fill the field splitting the date field into three separate selects and building the date on the server from those three elements Bastien From: [EMAIL PROTECTED] To: [EMAIL PROTECTED]; php-general@lists.php.net Date: Wed, 8 Aug 2007

Re: [PHP] Check if var has a date (timestamp or regular)

2007-08-07 Thread Richard Lynch
On Mon, August 6, 2007 6:52 am, OOzy Pal wrote: 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) Use the cool new filter extension to PHP or use PCRE. http://php.net/filter http://php.net/pcre

[PHP] Check if var has a date (timestamp or regular)

2007-08-06 Thread OOzy Pal
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

Re: [PHP] Check if var has a date (timestamp or regular)

2007-08-06 Thread brian
OOzy Pal wrote: 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) You could first check if the variable consists only of numbers. If so, it's likely a timestamp. If $var does consist of something