How to add minutes hours, even days on a date using the get time and set time methods.
HERE IS THE SOURCE CODE!
// Avraham Saltoun
// solutions at say-web dot com
// FREE to USE, COPY and DISTRIBUTE
var myDate:Date = new Date();
// by default new dates recieve
// system date and time
//Arithimetic operations are done
// in milliseconds. Let’s create a few
// variables to handle that…
var minutesMilliseconds:uint = 1000 * 60;
var hoursMilliseconds:uint = 60 * minutesMilliseconds;
var daysMilliseconds:uint = 24 * hoursMilliseconds;
//let’s add a day
myDate.setTime(myDate.getTime()+ daysMilliseconds);
trace (myDate);
// Thanks for watching!






2 Responses to “VIDEO: Arithmetic Operations with Date and Time on ActionScript”
Trackbacks/Pingbacks
great info…
look at more info here now…
Thank You!…
Thanks for enlightening me on the topic….