Inserting a future expiration date

Nov 24, 2015


I need to insert a date that is 2 years from the current date, and the last day of that month. For example, the certification expires in 2 years (730 days) from today, and at the end of that if I complete the course today (11/24/15), it will expire 11/30/17

Can anyone provide me with that code, please?




14 Replies
Alexandros Anoyatis

Ok, I totally misread your question - sorry it's already past midnight around here. I was thinking you needed validation towards those values.

You can totally achieve this by using Javascript. Best way to go about it is by using a library like date.js or moment.js, incorporating them via a web-object, then writing some library-specific code to calculate the correct expiration date.

Theresa Brighton

Hi Steve, I've successfully used the code you provided several times, however for some reason, my latest courses are no longer displaying the calculated expiration date when I test them in LMS; they are just displaying %FormattedDatePlus2Yrs% on the slide. Could you please take a look at my attached slide and let me know what I'm doing wrong??

Thanks in advance, Theresa

This discussion is closed. You can start a new discussion or contact Articulate Support.