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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux