Thanks using JJ instead of HH worked.
--- In flexcoders@yahoogroups.com, Maciek Sakrejda <[EMAIL PROTECTED]> wrote:
>
> >From the DateFormatter docs:
> 
> J: Hour in day (0-23)
> H: Hour in day (1-24)
> 
> I'm not sure why everyone has to reinvent their own date format strings
> (between Java, Flex, postgreSQL, and shell scripts, I'm now working with
> four different types), but it looks like the format string you want is
> 
> "DD-MM-YYYY JJ:NN:SS"
> 
> -- 
> Maciek Sakrejda
> Software Engineer
> Truviso, Inc.
> http://www.truviso.com
> [W]: (650) 242-3516
> [C]: (510) 717-5398
> 
> -----Original Message-----
> From: nehavyas13 <[EMAIL PROTECTED]>
> Reply-To: flexcoders@yahoogroups.com
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] dateFormatter in Action Script
> Date: Mon, 14 Apr 2008 13:55:15 -0000
> 
> I am using an .as class to provide data to flex pie chart.
> 
> In this class I am using a date formatter to format the date I am
> getting from the server. 
> 
> The date I get from the server is in this format : 
> Thu Apr 10 2008 00:00:00
> 
> I then use the dateFormatter.format to format this date but this
> modifies the time 00:00:00 to 24:00:00. Why does it do this? Do I need
> to change anything?
> 
> Below is the code:
> 
> private var dateTimeFormatter : DateFormatter=new DateFormatter();
> dateTimeFormatter.formatString= "DD-MM-YYYY HH:NN:SS";
> var dt1:Date=new Date( new String([EMAIL PROTECTED]));
> dateTimeFormatter.format(dt1);
> 
> The trace for dt1 is:
> dt1 :Thu Apr 10 00:00:01 GMT+0100 2008
> 
> The trace after formatting is :
> Formatted date : 10-04-2008 24:00:01
> 
> Thanks in advance.
> 
> Why does the formatting change the hours from 00 to 24? what do I need
> to do?
>


Reply via email to