Hi,
I'm using a datasource-bound listGrid to show data from a MS SQL database in a remote server. One of the ListGridField's is showing datetime data, currently in the form
2013-01-24T12:03:34.623+0000
I want to make this format more readable, so I want to how it in format "dd/mm/yyyy hh:mm:ss".
In the listGrid's datasource, the relevant field is of type DataSourceDateTimeField. I'm also doing this to the ListGridField:
dateField.setType(ListGridFieldType.DATETIME);
So that SmartGWT knows for sure this is a DateTime we're talking about.
Now, to set the column to my intended format, I've tried three things:
1. Setting a system-wide format with DateUtils.setShortDateTimeFormat (also tried with Normal instead of Short).
2. Setting the whole ListGrid's date format with
operations.setDateFormatter(DateDisplayFormat.TOSERIALIZEABLEDATE);
3. Setting the ListGridField's date format with
dateField.setDateFormatter(DateDisplayFormat.TOSERIALIZEABLEDATE);
None of these worked; the format is still the original one.
SmartGWT version: 3.1
SmartClient version: v8.3_2012-11-20/LGPL Development Only (built 2012-11-20)
Browsers: IE9, Chrome 24.0.1312.56 m
Thank you very much in advance.
I'm using a datasource-bound listGrid to show data from a MS SQL database in a remote server. One of the ListGridField's is showing datetime data, currently in the form
2013-01-24T12:03:34.623+0000
I want to make this format more readable, so I want to how it in format "dd/mm/yyyy hh:mm:ss".
In the listGrid's datasource, the relevant field is of type DataSourceDateTimeField. I'm also doing this to the ListGridField:
dateField.setType(ListGridFieldType.DATETIME);
So that SmartGWT knows for sure this is a DateTime we're talking about.
Now, to set the column to my intended format, I've tried three things:
1. Setting a system-wide format with DateUtils.setShortDateTimeFormat (also tried with Normal instead of Short).
2. Setting the whole ListGrid's date format with
operations.setDateFormatter(DateDisplayFormat.TOSERIALIZEABLEDATE);
3. Setting the ListGridField's date format with
dateField.setDateFormatter(DateDisplayFormat.TOSERIALIZEABLEDATE);
None of these worked; the format is still the original one.
SmartGWT version: 3.1
SmartClient version: v8.3_2012-11-20/LGPL Development Only (built 2012-11-20)
Browsers: IE9, Chrome 24.0.1312.56 m
Thank you very much in advance.
Comment