我创建了一个与日期相关的应用程序,其中将日期转换为不同的字符串和数字格式,例如DD-MM-YYYY,DD-MM-YY等
最佳答案
您好,您可以在以下代码中得到答案。
var d:Date = new Date();
Alert.show(d.toDateString(),"toDateString");
Alert.show(d.toLocaleDateString(),"toLocaleDateString");
Alert.show(d.toLocaleString(),"toLocalString");
Alert.show(d.toLocaleTimeString(),"toLocalTimeString");
Alert.show(d.toString(),"toString");
Alert.show(d.toTimeString(),"toTimeString");
Alert.show(d.toUTCString(),"toUTCString");
有很多选项可以将日期转换为字符串。您可以根据需要选择任何一个。
有一个不错的D @ Y ...
关于actionscript-3 - 如何在Flex 3中将日期转换为字符串,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/8677797/