Hi all,
How would you set the template to only display a record if the custom date time field you added is greater than today? Is this custom field definition also respectful of the timezone you set for the CMS or is it UTC?
Thank you!
LISE Date/Time Custom Field
Re: LISE Date/Time Custom Field
Not tested, but you'd want to do something like this:
It should use your server's local time, but you can confirm by echoing {$smarty.now} on any page.
Code: Select all
{$today=$smarty.now|date_format}
{$mydate=$item->fielddefs.mydate.value|date_format}
{if $mydate|strtotime > $today|strtotime}
this date is in the future
{else}
this date is right now or in the past
{/if}
Not getting the answer you need? CMSMS support options
Re: LISE Date/Time Custom Field
Thank you DIGI3, I appreciate you taking your time to help me.