 |

virgodesign
User
Mar 11, 2008, 4:47 PM
Post #1 of 2
(248 views)
Shortcut
|
|
updatedDate for News Items
|
Can't Post
|
|
Hi Dave, I noticed for the date field that the client actually has to manually select the date and time (instead of it being generated automatically - just like a blog). Can this be replaced with the "updatedDate" or "createdDate" function ? Do these fields need to be added into the Section Editors as a field, or are they just automatically generated ? Cheers Dude ! Avrom
|
|
|  |
 |

Dave
Staff
/ Moderator

Mar 12, 2008, 10:20 AM
Post #2 of 2
(240 views)
Shortcut
|
|
Re: [virgodesign] updatedDate for News Items
[In reply to]
|
Can't Post
|
|
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
|
|
|  |
|