Great, I'm glad that you have a working solution.  It's always messy
when you work with dates that are represented as strings.  With a Date()
type the fomatter should work correctly.  My suggestion would be to
research AMFPHP serialization/deserialization.  Like I said earlier,
it's much easier if the dto is deserialized as a VO.  In order to do
this, you'll need to create an AS equivilent of the dto.  I'm not a php
guy, but there's plenty of info out there concerning the subject.

-TH

--- In flexcoders@yahoogroups.com, Blair Cox <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED]
> Reply-To: flexcoders@yahoogroups.com
> Date: Fri, 24 Oct 2008 17:58:19 -0000
> To: flexcoders@yahoogroups.com
> 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