Message from discussion set date/timstamp to null
Received: by 10.101.6.10 with SMTP id j10mr2560522ani.2.1349026989107;
Sun, 30 Sep 2012 10:43:09 -0700 (PDT)
Received: by 10.236.149.34 with SMTP id w22ls9524559yhj.8.gmail; Sun, 30 Sep
2012 10:43:08 -0700 (PDT)
Received: by 10.236.192.164 with SMTP id i24mr1967709yhn.14.1349026988212;
Sun, 30 Sep 2012 10:43:08 -0700 (PDT)
Authentication-Results: ls.google.com; spf=pass (google.com: domain of
fvez...@gmail.com designates internal as permitted sender)
Received: by w3g2000yqe.googlegroups.com with HTTP; Sun, 30 Sep 2012 10:43:08
Date: Sun, 30 Sep 2012 10:43:08 -0700 (PDT)
X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 5.1; rv:15.0) Gecko/20100101 Firefox/15.0.1,gzip(gfe)
Subject: Re: set date/timstamp to null
From: drez <fvez...@gmail.com>
To: Propel Users <firstname.lastname@example.org>
Content-Type: text/plain; charset=UTF-8
Also, same error with DATE field
On Sep 28, 10:05=C2=A0am, drez <fvez...@gmail.com> wrote:
> I am currently using a Timestamps set to required=3Dfalse in Propel
> 1.6.X (last debian version), MySql.
> The field start null ok, but setting a date, then setting it back to
> null with $myObject->setMyDateTimeField(null); gives me an error
> "Uncaught exception 'Exception' with message 'DateTime::__construct():
> Failed to parse time string (null) at position 0 (n)".
> I also tried to set '0000-00-00 00:00:00' as my base value, and again,
> I could not figure how to make it work. Setting the value in the db is
> alright, but I haven't been able to set/query it with Propel so far.
> Any idea ?
> On Sep 28, 1:42=C2=A0am, Carsten Schumann <carsten.schum...@googlemail.co=
> > Hi Fred,
> > I'm using normal DateTime columns and setting DateTime columns to NULL
> > works fine (at least with my propel Version).
> > To understand your problem:
> > =C2=A0 1. Which version of propel are you using?
> > =C2=A0 2. What columntype did you define in your schema.xml/.yml file? =
> > =C2=A0 3. Did you set the required field to false in your schema.xml/.y=
> > =C2=A0 4. Is that column in your database also allowing NULL values?
> > (That's especially an issue if you change the required field later)
> > =C2=A0 5. How do you set your date to "no date"?
> > $myObject->setMyDateTimeField(null); ?
> > Carsten
> > On Thu, Sep 27, 2012 at 11:18 PM, drez <fvez...@gmail.com> wrote:
> > > Yeah I understand, since I use date everywhere that would be sad to
> > > have to change it all... and it worked very well since I needed to
> > > have a "no date set yet" state ... but thanks !
> > > On Sep 27, 3:17 pm, =D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9 =D0=A1=
=D0=B8=D0=B4=D0=B0=D1=88 <alexeysid...@gmail.com> wrote:
> > >> 2012/9/27 drez <fvez...@gmail.com>
> > >> > Hi,
> > >> > I have a field who need to be a date or no date.
> > >> > I have tryed all I can think of using null or '0000-00-00 00:00:00=
' and it
> > >> > have always resulted in error while getting or setting.
> > >> > Any way to do that ?
> > >> > Thank you,
> > >> > Fred
> > >> > --
> > >> > You received this message because you are subscribed to the Google=
> > >> > "Propel Users" group.
> > >> > To view this discussion on the web visit
> > >> >https://groups.google.com/d/msg/propel-users/-/HyuUd2B7DuIJ.
> > >> > To post to this group, send email to email@example.com=
> > >> > To unsubscribe from this group, send email to
> > >> > firstname.lastname@example.org.
> > >> > For more options, visit this group at
> > >> >http://groups.google.com/group/propel-users?hl=3Den.
> > >> Drez,As form me i use integer columns for date and function date(), =
> > >> dont have such problems.
> > > --
> > > You received this message because you are subscribed to the Google Gr=
oups "Propel Users" group.
> > > To post to this group, send email to email@example.com.
> > > To unsubscribe from this group, send email to propel-users+unsubscrib=
> > > For more options, visit this group athttp://groups.google.com/group/p=