Solved

ExtJS - DateTime Format question

Posted on 2012-04-04
2
2,844 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
Comment Utility
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
Comment Utility
thanks
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
This article discusses how to create an extensible mechanism for linked drop downs.
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…

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now