PDA

View Full Version : Problem with Date



chuvinha
13 Oct 2010, 4:14 AM
Guys, i am with a problem.
I am not able to view in the page the date.
I get this date of database from json.
I want to view the date in my data.field.
I tried to use the dateFormat="dd/MM/yyyy", mas não deu certo.
It appears [object Object].
Could someone help me?

Condor
13 Oct 2010, 4:24 AM
Post more information.

1. How does your server format the data in the response?
2. How did you configure your field type and dateFormat?
3. How did you configure your column renderer?

chuvinha
13 Oct 2010, 4:32 AM
Post more information.

1. How does your server format the data in the response?
2. How did you configure your field type and dateFormat?
3. How did you configure your column renderer?

I am working with java.
I used type Date and it was work.
I changed for String and now the date appears as 2010-06-07 14:10:32.0.
I want that the date it appears this format 07/06/2010.
How can I configure for this format?

Condor
13 Oct 2010, 4:38 AM
1. Have your server send the date formatted with: new SimpleDateFormat("yyyyMMddHHmmss").
2. Configure your field with: type: 'date', dateFormat: 'YmdHis'.
3. Configure your column with: renderer: Ext.util.Format.dateRenderer('d-m-Y');