Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
updatedDate for News Items

 

 


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:


Code
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

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4