Forum Discussion
MiriamKrajewski
12 years agoCommunity Member
Date Format for System Date
Hi there,
I followed the excellent advice and instructions from this thread for inserting a date into my Storyline
http://community.articulate.com/forums/p/12498/74794.aspx#74794 and I'm thril...
MikeWohlwend
12 years agoCommunity Member
Miriam Krajewski said:
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);
Miriam, for future reference, the line with "var dateString" could probably have its later order shifted; looks like it is in this line that the order of month / day / year is established.
If this script worked before, changing that line to:
var dateString=day + "/" + month + "/" + year
should also display it ordered as you want to see it.
So the nice thing is, sometimes code can be as comprehensible as that!