updatedDate for News Items

2 posts by 2 authors in: Forums > CMS Builder
Last Post: March 12, 2008   (RSS)

Re: [virgodesign] updatedDate for News Items

By Dave - March 12, 2008

Yes, if you're running v1.10 there's some new "special fields" that you can add (actually they should be automatically added when you upgrade) that do that.

You can use them just like a regular date field and they're called 'createdDate' and 'updatedDate'. Here's some sample code using the PHP date() function to format the date:

Created: <?php echo date("D, M jS, Y g:i:s a", strtotime($record['createdDate'])) ?><br/>
Updated: <?php echo date("D, M jS, Y g:i:s a", strtotime($record['updatedDate'])) ?><br/>


You can find the date formatting codes here:
http://www.php.net/date

And more info on special fields here:
http://www.interactivetools.com/docs/cmsbuilder/special_fieldnames.html

Give it a try and let me know how it goes! :)

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com