Comparing dates

3 posts by 2 authors in: Forums > CMS Builder
Last Post: April 25, 2011   (RSS)

By ikanizaj - April 22, 2011

I would like to do something like this, but I don't know syntax:

If (currentDate - createdDate < 5) {
<span>new article</span>
}

--
Igor Kani¾aj

Re: [ikanizaj] Comparing dates

By ikanizaj - April 22, 2011

basicly, if I use this:

<?php echo date("U", strtotime($record['Date'])) ?>
<?php echo date("U") ?>
the difference should be less then 345600, but I need a little help with php programming...
--
Igor Kani¾aj