Forum Discussion
VanessaWylie
9 years agoCommunity Member
How to insert current date variable into a "customised certificate slide".
Hi there,
I have created a certificate looking slide at the end of my course. I have added in variables for the learners name, their score achieved, I am just missing the date variable to be popul...
VickieSublette
Community Member
Do you know how to make it appear in date/month/year format? For example, 12 September 2020
NatalieBowman
3 months agoCommunity Member
Hi, this worked for me.
var m_names = new Array(" January", " February", " March",
" April", " May", " June", " July", " August", " September",
" October", " November", " December");
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth();
var yyyy = today.getFullYear();
if(dd<10) { dd='0'+dd }
var date= ' '+dd+m_names[mm]+', '+yyyy;
var player = GetPlayer();
player.SetVar("SystemDate",date);