Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread date value to server
Mon, Apr 17 2017 10:46 AMPermanent Link

Ronald

Hi,

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?

Greetings,
Ronald
Mon, Apr 17 2017 12:08 PMPermanent Link

Raul

Team Elevate Team Elevate

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
9http://www.elevatesoft.com/manual?action=viewtopic&id=ewb2&topic=Types)
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:

http://www.elevatesoft.com/forums?action=view&category=ewb&id=ewb_general&page=1&msg=10300#10300

Raul
Mon, Apr 17 2017 3:47 PMPermanent Link

Ronald

Raul wrote:

<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.

Ronald
Image