Search results

  1. J

    Negative values are seen as positive

    I followed your instruction as in 17 and it seems to be working
  2. J

    Negative values are seen as positive

    SELECT [Date calc].ID, [Date calc].Amount, [Date calc].Duedate, [Date calc].DatePaid, DateDiff("d",[Duedate],[DatePaid]) AS Days, IIf((DateDiff("d",[DueDate],[DatePaid])>4),[Amount]*3/1000) AS Expr1, IIf([Expr1]="Yes",[Amount]*3/1000) AS DtCr, IIf([Days]<"0","0","No") AS Expr2 FROM [Date calc];
  3. J

    Negative values are seen as positive

    Yes thanks my problem is however that when my days are minus days then access still calculates penalties wheras I don't want it that way. Only of the days are positive
  4. J

    Negative values are seen as positive

    Copy Of Date calc Query Copy Of Date calc Query ID Amount Duedate DatePaid Days Expr1 DtCr Expr2 1 R5 000,00 01-May-24 07-May-24 6 Yes 15 No 2 R3 000,00 01-May-24 23-Apr-24 -8 Yes 9 No The problem is that in record 2 access see the -8 as days late and not as days early and as such it is...
  5. J

    Negative values are seen as positive

    My problem is however, I am not familiar programming in Sql and are using a query design and built function
  6. J

    Negative values are seen as positive

    Expr1: IIf([Days]>"4","Yes","0")
  7. J

    Negative values are seen as positive

    This seems to look like what I intent to get
  8. J

    Negative values are seen as positive

    In my last comment if the value is less than 0 ie -1 then access observe it as 1 and not as minus 1
  9. J

    Negative values are seen as positive

    Days: DateDiff("d",[Duedate],[DatePaid]) Expr1: IIf([Days]>"4","Yes","0") DtCr: IIf([Expr1]="Yes",[Amount]*3/1000)
  10. J

    Negative values are seen as positive

    Expr1: IIf([Days]>"4","Yes","0") - This was just my test because in real state the value should either be minus days or plus days
  11. J

    Negative values are seen as positive

    I put the due date and then date paid - in that sequence My problem is that access seems to ignore the minus sign in front of the negative value and see it as an absolute value In my case I basically want to let the negative values be ignored and only the positive values calculated. So if my...
  12. J

    Negative values are seen as positive

    I am using the DateDiff function in my query. When the difference is positive it is fine but when it is negative I want access to see it as negative For example if my DateDiff value is negative it implies that the clients paid on time and there is no penalty, but if the value is positive it...
Back
Top Bottom