http://www.devshed.com/c/a/PHP/The-Basics-of-Serializing-Objects-in-PHP/


--- In [email protected], "Tim Hoff" <[EMAIL PROTECTED]> wrote:
>
> 
> See how messy this gets; when dates are represented as strings.  Look
> into AMFPHP serialization/deserialization.  If you get back a date,
> instead of a sting, you don't have to jump through these hoops.   I only
> say this because the amount of time it takes to setup the integration is
> sometimes less than the time it takes to hack the application into
> submission. :)
> 
> Glad that you have a working solution.
> 
> -TH
> 
> --- In [email protected], Blair Cox <blair.cox@> wrote:
> >
> > Many thanks Tim! I dropped the DateField component and tried a simple
> text
> > box, plus your suggestion and it works. So even though the database
> table
> > field is defined as a Date, the AMFPHP is bringing it in as a string.
> The
> > key part to this was .toString()
> >
> > Okay, so now back to an original dilemma. When using the DateField
> > component, I get a full UTC date output. I¹ve been able to use
> labelFunction
> > and DateFormatter and a couple others to get close to the required
> format of
> > YYYY-MM-DD, but what I end up with is YYYY-MM-D, because apparently 1
> > through 9 are not represented with a leading zero (01, 02, etc)
> >
> > If I cannot match the string in the db, it won¹t work, correct? Any
> hints on
> > this?
> >
> > --
> > Blair
> >
> >
> >
> >
> >
> > From: Tim Hoff TimHoff@
> > Reply-To: [email protected]
> > Date: Fri, 24 Oct 2008 17:58:19 -0000
> > To: [email protected]
> > Subject: [flexcoders] Re: Help: filterFunction and Dates
> >
> >
> >
> >
> > Ideally, in the result function, the dto would be cast to an
> associated AS
> > class as a VO; making it strongly typed. This can be done
> automatically by
> > using [RemoteClass(alias="com.myDTO")] in a VO class; but that's a
> more
> > involved topic. So, let's take this one step at a time. What is the
> data
> > type of item.Date_Collected? You can find this by inspecting the the
> object
> > in debug mode. If it's a string, try this in your filter function:
> >
> > return item.Date_Collected ==
> > dfconv.format(wholeDate.selectedDate).toString();
> >
> > The key is to compare apples to apples. If one side is an apple and
> the
> > other is an orange, you have to turn the orange into an apple before
> > comparing.
> >
> > -TH
> >
>


Reply via email to