Re: inserting DATE's using DB_DataObject 1.7.10
| From: | Yashesh Bhatia | Date: | Thu, 17 Mar 2005 10:53:19 +0000 |
| Subject: | Re: inserting DATE's using DB_DataObject 1.7.10 | ||
| References: | 1 2 3 | Groups: | php.pear.general php.pear.general |
| Request: | Send a blank email to pear-general+get-18109@lists.php.net to get a copy of this message | ||
Alan wrote:
On Thu, 2005-03-17 at 14:42 +0530, Yashesh Bhatia wrote:yep that worked.. thank you.ooops i think the some attachments did not go thru but here's the main one. test1.php require_once 'configDB.php'; require_once 'DataObjects/User.php'; $user = new DataObjects_User(); $user->name = "Foo Bar"; $user->dob = "1980-25-10";It assumes you are working with iso standard dates.. -> try 1980-10-25
it added a 1982-01-10 thx. yashesh.$user->income = 15000; $user->insert(); if i useIt will probably insert a date in 1982 for this..$user->dob = DB_DataObject_Cast::date("1980-25-10");
Regards Alan -- go pre http://www2.localaccess.com/rlalonde/pre.htm