Negative AMOUT issue

More
1 year 2 months ago #25159 by Bill
Negative AMOUT issue was created by Bill
Hello.

I am loading list of invoices into the database. some of the records have minus at the wrong place.

For example instead of -1245.00 I get 12345.00-

How can I address the issue?

Please Log in or Create an account to join the conversation.

More
1 year 2 months ago #25161 by admin
Replied by admin on topic Negative AMOUT issue
Hi Mark

Please try the following calculation.

var
  S: string;
  Len: Integer;
begin
  S:= [AMOUNT];
  Len := Length(S);
  if ((Len > 0) and (S[Len] = '-')) then
    Result := '-' + Copy(S, 1, Len - 1)
  else
    Result := S;  
end;

Mike
ETL Architect

Please Log in or Create an account to join the conversation.

Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Read more
Marketing
Set of techniques which have for object the commercial strategy and in particular the market study.
Google
Accept
Decline
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Google Analytics
Accept
Decline
Functional
Tools used to give you more features when navigating on the website, this can include social sharing.
Advertisement
If you accept, the ads on the page will be adapted to your preferences.
Google Ad
Accept
Decline
Save