Solved

ExtJS - DateTime Format question

Posted on 2012-04-04
2
2,957 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Requirements JQuery 1.6+ HTML CSS Introduction This article was inspired by an EE question (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28372511.html) on how to make a page show some balloons animate up a page…
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
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…

789 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