Plugin

Developer
Supported

Math Plus

ExpressionEngine 1.x, ExpressionEngine 2

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

     

You must be logged in to post.

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