Getting crazy with dates and pre-filters (CALC)

mkainz

Member
Hi! I'm getting crazy with the operations with dates (like adding months etc etc)
This is my code:

$frequenza_pagamenti = (int)'{contratti___frequenza_pagamenti_raw}';

if ($frequenza_pagamenti == 12) {
$data_seconda_rata = strtotime ( '+1 month' , strtotime ('{contratti___data_pagamento_prima_rata}') ) ;
return date('d/m/Y',$data_seconda_rata);}

The date shows correctly in details and list, but when i apply pre-filters as "Today", it doesn't work.
I'm unable to find out the problem.
 
Because the "today" filter expects to be dealing with a datetime element, or at least data with the standard MySQL YYYY-MM-DD format.

You could probably work round it by using "equals" and then something like DATE_FORMAT(NOW(), '%d/%m/%Y') in the value.
-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top