Welcome, Guest
Username: Password: Remember me

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

How to test if current unix timestamp is less than specified timestamp 1 year 1 month ago #110790

  • qsgt
  • qsgt's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 9
  • Karma: 1
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?
The administrator has disabled public write access.

How to test if current unix timestamp is less than specified timestamp 1 year 1 month ago #110795

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 7495
  • Thank you received: 1021
  • Karma: 296
Can you show the Expression Manager screen please ?
The administrator has disabled public write access.

How to test if current unix timestamp is less than specified timestamp 1 year 1 month ago #110801

  • qsgt
  • qsgt's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 9
  • Karma: 1
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

This message has an attachment image.
Please log in or register to see it.

The administrator has disabled public write access.

How to test if current unix timestamp is less than specified timestamp 1 year 1 month ago #110802

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 7495
  • Thank you received: 1021
  • Karma: 296
The administrator has disabled public write access.
The following user(s) said Thank You: qsgt

How to test if current unix timestamp is less than specified timestamp 1 year 1 month ago #110861

  • qsgt
  • qsgt's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 9
  • Karma: 1
Thanks a lot it works perfectly now!

qsgt
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.205 seconds