Search
Other Articles Anywhere questions
Forum

Comparison of the current time

Hitsch's Avatar Hitsch
We have a custom field "player-on" with options "06", "12", "00". We want to display an element depending on the time: Articles Anywhere should compare the current time (hour) with the values: If the time (hour) is greater (later) than the value in the option field, content should be output, otherwise not.
{article}{if date('now', 'H')>player-on:value}[text]{/if}.{/article}
Peter van Westen's Avatar Peter van Westen ADMIN
Working fine for me. What type of field is the "player-on" field?
Also: if the value would be "00", then it would show all day except between 00:00 and 01:00. Is that what you want?
Please post a rating at the Joomla! Extensions Directory
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription