You are not logged in.
Pages: 1
For javascript datetime just integer value for milliseconds since midnight on January 1, 1970, when transmit json, encode just like integer, so i define it like this:
TTimeStamp = type Int64;
TSQLBase = class(TSQLRecord)
private
fEta: TTimeStamp;
published
property Eta: TTimeStamp read fEta write fEta;
this is all ok until now, now i need to generate report, i use
JSONToDataSet in unit mORMotVCL to convert json to TSynSQLTableDataSet,
but the datetime all display it's integer value, is there any method
let the javascript datetime to display ok, any suggest is welcome, thanks!
Mingda
Offline
Use TUnixTime or TUnixMSTime types.
Just test, JSONToDataSet in mORMotVCL not deal with TUnixMSTime type, still show it's int64 value, -:(
Offline
And with https://synopse.info/fossil/info/19d1a8c122 ?
Offline
And with https://synopse.info/fossil/info/19d1a8c122 ?
strange, after update, the fastreport connect to the dynamic create dateset, (TSynSQLTableDataSet create by JSONToDataSet in mORMotVCL) still display integer value. (By the way, you are a super man. )
update:
Perhaps i use raw sql to get the result, and column name use alias, in the json result, there is no column type info, like below
DataSetSql := 'select columnA aliasA, columnB aliasB from table';
Json := Client.ExecuteJson([], DataSetSql);
if Json = '' then Continue;
ReportDataSetDynArray[I].Dataset := JSONTODataSet(nil, Json);
Last edited by mingda (2017-03-06 14:01:09)
Offline
Pages: 1