|Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread|
|Messages 1 to 3 of 3 total|
|date value to server|
|Mon, Apr 17 2017 10:46 AM||Permanent Link|
Saving values to a dibsam table on my server works fine, but...
In one EWB table I have a field of type Date. On my server I have a DBISam table with a Date field.
If I send a form with the date: 17-4-2017 then it sends 1492439070888 to my server as the value for this date.
How do I assign this value to the DBISamtable on my server? I tried:
ParamByName('the date field").AsDate:=StrToDate(FieldValue)
That does nor work because the field value is not an real datestr.
Then I tried:
ParamByName("the date field").AsInteger:=StrToInt(FieldValue)
Now the 1492439070888 is an illegal value (too large for an integer?)
How should I do this?
|Mon, Apr 17 2017 12:08 PM||Permanent Link|
On 4/17/2017 10:46 AM, Ronald wrote:
> In one EWB table I have a field of type Date. On my server I have a DBISam table with a Date field.
> If I send a form with the date: 17-4-2017 then it sends 1492439070888 to my server as the value for this date.
EWB/JS uses milliseconds from 1970
which is not same as Delphi TDateTime.
You'd need to convert and also account for UTC.
See for example here for samples and discussion:
|Mon, Apr 17 2017 3:47 PM||Permanent Link|
<You'd need to convert and also account for UTC>
You are right, stupid me, totally forgotten this solution nowI am working with the modules.
Thanks a lot.