Solved

ExtJS - DateTime Format question

Posted on 2012-04-04
2
2,926 Views
Last Modified: 2012-08-14
Hello all,

I have a column model and I am trying to format a Oracle timestamp as shortdate with the time.  My Column Model has the following how do I format it as this:
Example current return in the cell: 2012-04-04 14:54:32.275556

I want to show it just as:  04/04/2012 14:54 for example
{
                  header : "Last Updated",
                  dataIndex : 'modifytime',
                  width: 200,
                  sortable: true,
                  renderer: function renderFoo(value, p, record){
                        return value;
                  }
0
Comment
Question by:sbornstein2
2 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 245 total points
ID: 37814985
Try :
{
                  header : "Last Updated",
                  dataIndex : 'modifytime',
                  width: 200,
                  sortable: true,
                  renderer: renderer: Ext.util.Format.dateRenderer('m/d/Y H:i'),

Open in new window


http://www.objis.com/formationextjs/lib/extjs-4.0.0/docs/api/Ext.util.Format.html
0
 

Author Closing Comment

by:sbornstein2
ID: 37817346
thanks
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question