1) v8.3p_2012-11-25/PowerEdition Deployment (built 2012-11-25)
So I can't imagine I'm the first person trying to do this, but nothing pops up in the forum.
I have a SQL database table with a datetime value stored as milliseconds since Jan 1, 1970 00:00:00. The format of the database column is double.
Here's some example values:
I'm using .ds.xml files and would like to map this column to a Smart GWT field type of 'datetime'. I'd then like to display this value in a ListGrid and show it as a human readable time...soemthing in the format of MM/dd/yyyy HH:mm:ss.
The grid shows the filter editor and I'd like to be able to allow the user to filter the grid data using the DateTime picker.
I'd like to believe that Smart GWT has features and capabilities to support all my needs above but I haven't been able to get it to work.
Here's my datasource definition for that field:
I get errors when the page loads:
I tried using sqlDateFormat but that assumes the date is being stored in as a number like 20121202 when in fact my storage strategy is the actual epoch value not a number matching yyyyMMdd.
Here are my questions:
1) Does Smart GWT support epoch-stored datetime? If so, what should my field definition be?
2) If not, what's the best way to handle my situation (sql convert to date in operatingbinding? custom formatter and handling filter operation? etc)
3) Do I need to implement a custom cell formatter for that datagrid field?
4) Will the default Grid FilterEditor for this column work as expected?
5) Is there any way to allow the DateTime Picker for the filter editor to include seconds (right now it just appears to allow hours and minutes).
Thanks
So I can't imagine I'm the first person trying to do this, but nothing pops up in the forum.
I have a SQL database table with a datetime value stored as milliseconds since Jan 1, 1970 00:00:00. The format of the database column is double.
Here's some example values:
Code:
1354037674595 1354038674755 1354024674791 1354035674836 1354054674879 1354034674912 1354034674954 1354016675003 1354034675048 1354034675085
The grid shows the filter editor and I'd like to be able to allow the user to filter the grid data using the DateTime picker.
I'd like to believe that Smart GWT has features and capabilities to support all my needs above but I haven't been able to get it to work.
Here's my datasource definition for that field:
Code:
<field name="time" type="datetime" sqlStorageStrategy="number" title="Time" canEdit="false" />
Code:
=== 2012-12-03 19:59:51,817 [l0-7] WARN SQLTransform - [builtinApplication.device_fetch] Unable to parse a valid date, time or datetime out of value 1.354034675085E12 using format string yyyyMMdd
Here are my questions:
1) Does Smart GWT support epoch-stored datetime? If so, what should my field definition be?
2) If not, what's the best way to handle my situation (sql convert to date in operatingbinding? custom formatter and handling filter operation? etc)
3) Do I need to implement a custom cell formatter for that datagrid field?
4) Will the default Grid FilterEditor for this column work as expected?
5) Is there any way to allow the DateTime Picker for the filter editor to include seconds (right now it just appears to allow hours and minutes).
Thanks
Comment