Date Format in Record List

3 posts by 2 authors in: Forums > CMS Builder
Last Post: March 18, 2013   (RSS)

By ross - March 18, 2013

Hi Paul

Thanks for posting!

I see what you mean. When it comes to displaying date fields on your webpages, you can actually use the date() function.  There should be an example right in the viewer code when you are copying and pasting it. You can then look up the options on PHP's documentation page:

http://php.net/manual/en/function.date.php

Of course, if you are saying that you know about all that and are actually suggesting we update the code so by default, the code generated by our code generator matches what is set for the time format in General Settings, that's a totally different thing :).

Let me know what you think. Thanks!

-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

By pault - March 18, 2013

Hi Ross,

Thanks, I know how to use date() on web pages but a customer has mentioned that in the listing of records within the Admin interface then date fields are shown as m-d-Y, regardless of the format defined in General Settings.

I don't mean the code generator, it's just in the CMS Builder admin pages.  I found the code that defines this on line 536 in list_functions.php

    if (@!$fieldSchema['showTime']) { $displayValue = date("m-d-Y", strtotime($record[$fieldname])); }

I just wondered if this could be updated to use the General Settings.

Thanks, Paul.