i get current date like this code
var currentdate:Date=new Date();
but i want to show like this format YYYY-MM-DD HH:MM:SS.now i got this format. but i checked currentmonth at run time.it showed 07.This month is Aug.how to change give solution
In the Date class, months are represented from 0 to 11. So you might have to use currentdate.getMonth() + 1. This is not an error, just a representation that is being followed by Flex.
The DateClass the months object is an array and always arrays start from 0.So u need to write the code as followning,
date.getMonth() + 1 // this is not a bug. This is as3 convention.
Mark this if helpful