UDT for comparing create date with modified

General project discussion. NOT for help questions.
Post Reply
MrWumpus
New Member
New Member
Posts: 5
Joined: Sun Feb 10, 2008 6:44 pm

UDT for comparing create date with modified

Post 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!
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: UDT for comparing create date with modified

Post by calguy1000 »

Either way, you're going to need a UDT I think.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Post Reply

Return to “General Discussion”