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 month 2 weeks ago #110790

  • qsgt
  • qsgt's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 8
  • 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 month 2 weeks ago #110795

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6276
  • Thank you received: 801
  • Karma: 240
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 month 2 weeks ago #110801

  • qsgt
  • qsgt's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 8
  • 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


image_2014-07-10.jpg


Thanks for the help,
qsgt
The administrator has disabled public write access.

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

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6276
  • Thank you received: 801
  • Karma: 240
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 month 2 weeks ago #110861

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

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