Change Date Format in createdDate and updatedDate fields

3 posts by 2 authors in: Forums > CMS Builder
Last Post: November 29, 2010   (RSS)

Re: [gkornbluth] Change Date Format in createdDate and updatedDate fields

By Jason - November 29, 2010

Hi Jerry,

The date format in the admin section only affects how the date is displayed, not how the date is stored.

If you're wanted to affect how it's displayed inside CMSB, you can use the setting in admin to set it as either "Month Day Year" or "Day Month Year". We currently don't have the ability to format the time, though we can change that with some customization. Let me know if you'd like us to look into that for you.

If you want to format the date on pages outside CMS Builder, you can do that using the php date functions:

[url http://ca.php.net/manual/en/function.date.php]http://ca.php.net/manual/en/function.date.php[/url]

Example:
<?php echo date("m/d/Y",strtotime($record['createdDate']);?>

Hope this helps.

Let me know if you have any questions.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Change Date Format in createdDate and updatedDate fields

Thanks Jason,

I didn't realize that I could format these as standard date fields.

Appreciate the information. (and the quick response)

Jerry

BTW I think the "semicolon" should be a "close parenthesis"
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php