ActionScript-3 – Date format of Adobe Flex

I have an appointment and I want to format the date:
YYYYMMDD HHMMSS
So for today
20100304 173000

But when I do:

var todayStr:String = today.getFullYear()+today.getMonth()+today.getDay()+today.getHours()+ today.getMinutes();

The problem is that getMonth() sends “3” in March, and I think “03”. I have the same problem this day.

What should I do?

Thank you.

You can use DateFormatter. Take a look at this: Dateformatter @ adobe

var formatter: DateFormatter;
formatter = new DateFormatter();
formatter.formatString = "YYYYMMDD HHNNSS";
formatter.format(dateInstance);

Beware of the use of’N’ in minutes

I have an appointment and I want to format the date:
YYYYMMDD HHMMSS
So for today
20100304 173000

But when I do:

var todayStr: String = today.getFullYear()+today.getMonth()+today.getDay()+today.getHours()+today.getMinutes();

The problem is that getMonth() sends “3” in March , I want to “03”. I have the same problem this day.

What should I do?

Thank you.

You can use DateFormatter. Take a look at this: Dateformatter @ adobe

< /p>

var formatter: DateFormatter;
formatter = new DateFormatter();
formatter.formatString = "YYYYMMDD HHNNSS";
formatter.format(dateInstance);

Beware of the use of’N’ in minutes

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 352 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.