I guess I really don't understand what the problem is here?? I have a
smalldatetime (or a datetime) in a MSSQL database. I setup a value object in
AS to have the date field as a Date object. I go get the date from
ColdFusion using RemoteObject. The cfc sets up a CF "value object" with the
date as a CF Date object. And, voila, the MSSQL datetime becomes an AS Date
object.

 

I don't have to convert anything to a string, or any other kind of object.
So, what's the problem here???

 

~randy

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Dale Fraser
Sent: Monday, December 15, 2008 9:51 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Flex dates and time zones.

 

Why does Flex do this?

 

If I get a date out of the db and want to deal with it as a date, surely
this should be possible. How can the flash player determine it needs to
change it to a different date.

 

There must be some other option rather than converting to a string.

 

Regards

Dale Fraser

http://learncf.com <http://learncf.com/> 

http://flexcf.com <http://flexcf.com/> 

 

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Paul Kukiel
Sent: Tuesday, 16 December 2008 1:46 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Flex dates and time zones.

 

Thanks Tracy,

 

I knew I was going to get this answer.  I already got this working with
strings as a test sample looks like I have to convert the rest of the app.
Surely others are feeling my pain with this issue.

 

And Nate I look forward to seeing what you have come up with when its ready.

 

Paul.

 

On 15/12/2008, at 7:46 PM, Tracy Spratt wrote:






 

Pass the date as a string.

Tracy

 

  _____  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Paul Kukiel
Sent: Monday, December 15, 2008 3:17 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex dates and time zones.

 

I have a date in a server in Australia:  22/12/2008 12:00:00 AM

I am using this label function for the grid to try and fix the time zone
issue but my date always comes back to me as 21/12/2008 in the datagrid.  I
really just wan the exact date from the database regardless of where I am in
the world.

Any ideas?


// Label Grid Date
        public static function labelGridDate(item:Object,
column:DataGridColumn):String {
            var formatter:DateFormatter = new DateFormatter();
            var myDate:Date = item[column.dataField];
            formatter.formatString = "DD MMM YYYY";
            
            var offsetMilliseconds:Number =
item[column.dataField].getTimezoneOffset() * 60 * 1000;
            item[column.dataField].setTime(item[column.dataField].getTime()
+ offsetMilliseconds);

            return formatter.format(item[column.dataField]);
        }

Paul.





 

 

 

 

Reply via email to