Date and Time

The Date class is built-in to Flash. An instance of the Date is automatically initialized with the current date and time. The class has methods for retrieving the day, month, year, hours, seconds, and more.

Get Adobe Flash playerIn the movie above the date is displayed in a label lblDate:
var d:Date=new Date();
You could also just use trace(d);

Edit the last statement by typing a dot after d. When you do the list of methods will appear. Try tracing each of the choices from that window.


Download the movie

NEXT: The Date