PDA

View Full Version : how to get the current date


arun vallappan
09-26-2007, 10:26 PM
hi
can anyone tell me how to get the current date
thanks in advance

drkstr
09-26-2007, 11:27 PM
var currentDate:Date = new Date();

Best Regards,
...aaron

uday_sgh
12-05-2008, 06:46 PM
hi
can anyone tell me how to get the current date
thanks in advance


You can get current date by using this code:

var t:Date = new Date();
trace(t.date);
// Get current year:
trace(t.fullYear);
//Get current month and Day...
trace(t.month+1);
trace(t.day+1);
// NOTE: the month and day will be numeric number January=0, February=1 ..... December=11 And Sunday=0, Monday=1....Saturday=7

Please let me know this code is working or not.

Thanks,
Uday
uday_sgh at yahoo
Sr. Flash Developer
Hyderabad