Recent

Author Topic: Error: External: FLT INVALID OPERATION in DateTimeToTimeStamp  (Read 1334 times)

dmitryb

  • Jr. Member
  • **
  • Posts: 62
Error: External: FLT INVALID OPERATION in DateTimeToTimeStamp
« on: September 03, 2020, 09:45:12 pm »
I have error in DateTimeToTimeStamp in dati.inc

Error: External: FLT INVALID OPERATION in DateTimeToTimeStamp.

It happens only in my application in code

Code: Pascal  [Select][+][-]
  1.   MemTableEh1.Filter := 'DTOS(SaleDate) > "19941220"';  

and not happens in demo call

Code: Pascal  [Select][+][-]
  1. procedure TForm1.Button4Click(Sender: TObject);
  2. var
  3.   ts: TTimeStamp;
  4. begin
  5.   ts := DateTimeToTimeStamp(EncodeDate(9999, 12, 31));
  6. end;
  7.  

So I can't create Demo project.
Only screenshots

« Last Edit: September 03, 2020, 09:50:04 pm by dmitryb »

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: Error: External: FLT INVALID OPERATION in DateTimeToTimeStamp
« Reply #1 on: September 03, 2020, 10:23:14 pm »
Hi!

There must be something totaly wrong in your computing.

DateTime is 62923564800000  !!!!

That are the days since 1900.

62923564800000 / 365 = 172 Giga Years.

Even the sun wont be satisfied with this time span.
She will turn in 3 or 4  Giga Years into a Red Giant.
And after that then remains insterstellar nebular.

Winni
« Last Edit: September 03, 2020, 10:29:39 pm by winni »

dmitryb

  • Jr. Member
  • **
  • Posts: 62
Re: Error: External: FLT INVALID OPERATION in DateTimeToTimeStamp
« Reply #2 on: September 03, 2020, 11:00:19 pm »
in the expression  MemTableEh1.Filter := 'DTOS(SaleDate) > "19941220"'; 
there is no reference to the current date.

I think it is an error in the TCustomExpressionParser or TBufDatasetParser when it try to take value from SaleDate Field from DataSet.

Parser put incorrect value from SaleDate Field into Args[0] for FuncDateToStr function.
See screenshot

 

TinyPortal © 2005-2018