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

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

 



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: snsanju@xxxxxxxxx> To: oozypal@xxxxxxxxx; php-general@xxxxxxxxxxxxx> Date: Wed, 8 Aug 2007 16:50:39 +0530> Subject: RE:  Check if var has a date (timestamp or regular)> > 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> 
_________________________________________________________________
Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us

[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