Page 1 of 1

UDT for comparing create date with modified

Posted: Thu Feb 14, 2008 10:13 pm
by MrWumpus
Hi, I need newbie help for something I think would be simple enough: I want a function to tell whether the modified date of the page is newer by x number of days than the created date. I started with this in my template:

Code: Select all

{if content_modified_date > content_created_date}Page was modified!{/if}
I'm not sure this is even working, but if so it is comparing the entire date including the time which I do not wish to do. I only want to test whether the modified date is at least 24 hours older than the created date.

Am I even on the right track here? Is this better done with a UDT or in the template?

Thanks!

Re: UDT for comparing create date with modified

Posted: Thu Feb 14, 2008 10:15 pm
by calguy1000
Either way, you're going to need a UDT I think.