Forum Discussion
RaymondWan
14 years agoCommunity Member
Date Variables available?
Hi there - just curious to know if it's possible to have a date variable populated in Storyline?
So the course can show the date the course is being taken...
I'm thinking about using such a fea...
CurtZilbersher
13 years agoCommunity Member
Could anyone (or Brian) please tell me how to modify Brian's javascript so that I can get the current date minus x number of days. The script needs to recognize that the result has to be an actual date; not a negative number. So, if it's only 12/3/2013, subtracting 5 days shows 12/28/2013, NOT 12/-2/2013.
Here's the script which works to get today's date:
var currentTime = new Date()
var month = currentTime.getMonth() + 1
var day = currentTime.getDate()
var year = currentTime.getFullYear()
var dateString=month + "/" + day + "/" + year
var player = GetPlayer();
player.SetVar("SystemDate",dateString);
Related Content
- 12 months ago
- 12 months ago
- 12 months ago
- 12 months ago