请参阅Date
课程和以下属性(根据您的问题按顺序):
-
fullYear
-
month
-
date
-
hours
-
minutes
-
seconds
醇>
var date:Date = new Date();
var answer:String = date.fullYear + "-" + (date.month+1) + "-" + date.date + " " + date.hours + ":" + date.minutes + ":" + date.seconds;
trace(answer); // 2012-1-17 10:48:41