Time & Date Variables in Storyline

Hi All,


I saw the posting to help the discussion regarding insert the current date into the course using a javascript. However, it puts the date in MM/DD/YYYY format. How would you go about putting the date into a format like,"Thursday, August 22"?


Also, how would you write a javascript to show the current time? I don't need a timer, but an actual clock. I found a few javascripts online (http://www.quackit.com/javascript/tutorial/javascript_date_and_time.cfm) but they didn't work. I think its because they are not articulate specific.

I am completely new to java so I have no idea how to write them from scratch. Any help is appreciated!!!

57 Replies
Alison  L.

These comments have taken on new life and meaning since the initial post and comments. I'm just surprised the analog clock post : https://community.articulate.com/discussions/articulate-storyline/analog-clock-ist-in-storyline-360-using-dials-and-javascript was never brought up. Then again, the author never provided the .story for it to see what makes it tick, sort to speak.

Delia West

Hello,

I know this thread has four years of history, but I wanted to tack on a new question to it. 

I am creating a program that involves a goal setting component.  I want my learners to input a number 1-14 in response to asking them how many days will they choose to evaluate the goal they just set.  Would it be possible for them to be shown a future date which is the number of days they chose from the current date?

Delia West

Thank you Russell,

This is the start I was looking for. I didn't realize the code could be that short and simple for what I was asking. I spent an hour searching, but spending 5 minutes on asking my question on what I thought a forgotten post made all the difference.

I also wanted to limit the choice that my learner has in adding days.  I put in a slider.  Then I had the slider have 15 positions (0-14).  I was able to replace "NumericEntry" to "Slider1" in the JavaScript, and it worked! Sliding to position "1" gave tomorrow's date, position "2" gave Friday's date, etc.  This seemed to work, but if anyone has any words of wisdom to share in doing it this way, I'm all ears.