Forum Discussion

MiriamKrajewski's avatar
MiriamKrajewski
Community Member
12 years ago

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 thrilled to say it's working just fine.

The date format is month/day/year but my course will be primarily used outside the US (where most countries record the date as day/month/year).  I manged to change the order of the string instruction so that my output is now day/month/year but I would ideally prefer if the date came out as the word instead of the number.  ie 15 January 2013 instead of either 1/15/13 or 15/1/13, as this would ensure the date was read properly globally.

I've tried searching the web for Javascript advice but I have no knowledge of JS and the advice is losing me completely!  Can anyone suggest adjustment to the JS code that is recommended in the above thread, which is:

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);