import mx.controls.Alert;
import mx.formatters.DateFormatter;
public class DateFormat
{
public function DateFormat()
{
}
public static function getYYMMDDDate():String{
var a:Date=new Date();
var date:String;
var fr:DateFormatter=new DateFormatter();
fr.formatString="YYYY-MM-DD";
date = fr.format(a);
return date;
}
public static function getDataYYMMDDHHMMSS():String{
var a:Date=new Date();
var date:String;
var fr:DateFormatter=new DateFormatter();
fr.formatString="YYYY-MM-DD JJ:NN:SS";
date = fr.format(a);
return date;
}
}