ReReplacer

Is it possable to replace a tag wioth a calculation?

11 months 3 days ago #77217

Roland de Leeuw's Avatar Roland de Leeuw

Hello i would like to replace the tag: %%jaar_ervaring%% with the calculation: date:%Y - 2013, so it will give an answer of 4 year.

Is this possible?

11 months 3 days ago #77218

Peter van Westen's Avatar Peter van Westen Admin

Yes, you can use the date tag.
See the list of Dynamic Tags under the replace field.

11 months 3 days ago #77220

Peter van Westen's Avatar Peter van Westen Admin

11 months 3 days ago #77223

Roland de Leeuw's Avatar Roland de Leeuw

Found that already, but now i want this year - 2013 so it will show 4 instead of 2018

11 months 3 days ago #77224

Peter van Westen's Avatar Peter van Westen Admin

Ah, ok, misunderstood you.

You can use PHP in the replacement field if you switch on the 'Treat as PHP' function.
So you can do something like:

<?php echo date('Y') - 2013; ?>

11 months 2 days ago #77230

Roland de Leeuw's Avatar Roland de Leeuw

Peter van Westen wrote:

Ah, ok, misunderstood you.

You can use PHP in the replacement field if you switch on the 'Treat as PHP' function.
So you can do something like:
<?php echo date('Y') - 2013; ?>

YES! Ofcourse, in PHP everything is possible!

Thankyou!