Skip to main content
Known Participant
March 31, 2017
Answered

Searching for correct typing literal values for cpinfocurrentdatestringddmmyyyy variable in script

  • March 31, 2017
  • 1 reply
  • 459 views

Hello dear Adobe Captivate experts! I' would like to spend learner every day a new Training if they click on a Picture. I created a script and I use the variable cpinfocurrentdatestringddmmyyyy. That it works correct, I Need the literal values for the entries. Would somebody mind sending me a solution? As an example: What's about the first April? 01/04/2017 or 1/4/2017?

This topic has been closed for replies.
Correct answer Lilybiri

O.k. And what value delivers the variable$$cpInfoCurrentDate$$ On 31st of march the number is 31. But what is the number on 1st of April? 01 or 1? Would you mind sending me another expert answere?


It will be 01, but that doesn't matter for a mathematical operator: 01 or 1 is the same....

You can also combine cpInfoCurrentDay (number 1-7) and cpInfoCurrentMonth (1-12) for the condition.

   

1 reply

Lilybiri
Legend
March 31, 2017

Gerhard, it has not much sense to use the operator 'greater or equal' with a string, you need a number or use only 'equal to'. Do you need the 'greater'? I would have to search for a proper solution with the other date variables.  Can you explain exactly what you want to check?

Known Participant
March 31, 2017

Thank you very much for so quick answering. I would like to create a game. There are 10 eggs. And behind every egg is a Hyperlink to a Training. On Monday the Training is about "XX", on Tuesday the Training is about "YYY". So it's very day different. But the Trainings before the current date should been visible. But I'll try it with the day System variable. That maybe a good idea. Kind regards from Austria by Gerhard.

Lilybiri
Legend
March 31, 2017

cpInfoCurrentDay results in a number: today (Friday) is number 6. If you schedule indeed in one week, that is without any doubt the best choice.

BTW Did you download my descriptive table with system variables? You find it under this blog post:

System variables in Captivate 8/9 - Captivate blog