Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2002
    Location
    NJ
    Posts
    139

    Unanswered: Previous Record Subtraction

    Hi

    Crystal Report VS5

    I am trying to compare two dates and times from a previous record and I don't know how to do it. I am able to add, subtract, et cetera... but can not do it when it comes to subtracting a date and time from a previous record to the current one in crystal.

    I need to subtract TimesheetDetail.StartDateTime from the previous record from to TimesheetDetail.EndDateTime in the current one.

    The formula I use only subtract one from the other in the current record.
    Code:
    time({TimesheetDetail.EndDateTime}-{TimesheetDetail.StartDateTime})
    does anyone know how to do it?

    regards,

    Alexxx

  2. #2
    Join Date
    Oct 2004
    Location
    Cavite,Philippines
    Posts
    31
    Hi,

    Try to use the previous function.

    e.g.

    {Sample_Test.DateTime} - previous({Sample_Test.DateTime})

    Previous function gets the value of the previous record...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •