Forum Discussion

MaximilianoForm's avatar
MaximilianoForm
Community Member
2 months ago

Adding Date to a certificate

Good afternoon, 

I created a course completion certificate and I was asked to add the date of completion. I could not find how to do this. I appreciate some direction. Thank you!

  • Nedim's avatar
    Nedim
    Community Member

    You'll need a bit of help from JavaScript. First, create a custom text variable called currentDate in Storyline. Then, insert a text box and reference the currentDate variable. Finally, run the Execute JavaScript trigger with the code below when the timeline starts on this slide:

    const currentDate = new Date().toLocaleString('default', { month: 'long', day: 'numeric', year: 'numeric' });
    setVar('currentDate', currentDate);

    Result: January 13, 2025

    Find the attached .story file for reference. 

    • MaximilianoForm's avatar
      MaximilianoForm
      Community Member

      Nedim, thank you for the instructions, they worked really well. Much appreciated.