Re: inserting DATE's using DB_DataObject 1.7.10

From: 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:
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
yep that worked.. thank you.
$user->income = 15000; $user->insert(); if i use
    $user->dob = DB_DataObject_Cast::date("1980-25-10");
It will probably insert a date in 1982 for this..
it added a 1982-01-10 thx. yashesh.
Regards Alan -- go pre http://www2.localaccess.com/rlalonde/pre.htm


« previous php.pear.general (#18109) next »