Plugin

Archived
Forum
(read-only)

Math Plus

ExpressionEngine 1.x, ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Laisvunas

     

Math and dates in an if statement to hide Grid rows after certain period of time.

Support Request

johnhoysa
johnhoysa

Is there a way to take dates from a Grid row and compare it to a future time using this plug-in? Something like:

{if {bio_pull_in_tour_dates:tour_dates:tour_date_of_show format="%U"{exp:math_plus decimal_places="0" calculate="({var1} + {var2})" var1="{bio_pull_in_tour_dates:tour_dates:tour_date_of_show format="%U"}" var2="86400" }{math_plus_result}{/exp:math_plus}}

 My code to render here

{
/if} 

My date field is this one:

{bio_pull_in_tour_dates:tour_dates:tour_date_of_show format="%U"

I hope this helps. If there is an easier way to get this done please let me know!

Thanks!

John

MiaJones
# 1
MiaJones

I’ve had a problem with hiding Grid rows after certain time period. I wanted to create a timer so that the rows would hide after 30 minutes, but again, the math is incorrect. Also, you follow briansclub and get more new ways to trade online. So I came up with an if statement to calculate the time between each row so that they could be hidden after certain time period.