How to test if current unix timestamp is less than specified timestamp

More
3 years 1 month ago #110790 by Qsgt
Qsgt created the topic: How to test if current unix timestamp is less than specified timestamp
Hi,

I have a survey in which I need to test to see if the current time stamp is greater than a specified timestamp I am using this code
The time is {gmdate("l jS \of F Y")}  this means that the {if(time()<1414713600,'early',if(time()<1414800000,'standard','late')}rate will apply to this registration.
 
this registration must be completed in the next {if(time()<1414713600,time()-1414713600,if(time()<1414800000,time()-1414800000,time()-1419638400)}secounds in order to still be eleagable for this rate

How ever I keep getting unsupported syntax erors. Does anyone know why?

Please Log in to join the conversation.

More
3 years 1 month ago #110795 by DenisChenu
DenisChenu replied the topic: How to test if current unix timestamp is less than specified timestamp
Can you show the Expression Manager screen please ?

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
3 years 1 month ago #110801 by Qsgt
Qsgt replied the topic: How to test if current unix timestamp is less than specified timestamp
Please see the attached screenshot of the screen showing the syntax errors. I am wanting to put the code into the welcome screen on the survey. Hovering over the errors returns : unsupported syntax errors




Thanks for the help,
qsgt
Attachments:

Please Log in to join the conversation.

More
3 years 1 month ago #110802 by DenisChenu
DenisChenu replied the topic: How to test if current unix timestamp is less than specified timestamp

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: Qsgt

Please Log in to join the conversation.

More
3 years 1 month ago #110861 by Qsgt
Qsgt replied the topic: How to test if current unix timestamp is less than specified timestamp
Thanks a lot it works perfectly now!

qsgt

Please Log in to join the conversation.

Did you already participate in our customer survey?

Don't miss your chance for great prices.

Please click here to participate:

Start now

Start now!

Just create your account and start using Limesurvey today.

Register now