calculate end time
Printed From: Crystal Reports Book — Forum Name: Technical Questions
Posted By: sanchezgmc06 — 17 May 2019 at 10:27am
hello
I need help in how to calculate the end time.
I have the following 2 fields
Start_time
Duration (in minutes)
now i need to calculate at what time did the service end based on the start time and duration of the service
thanks for your help
Posted By: DBlank — 17 May 2019 at 10:30am
is it a datetime field or only a time field.
if only time how do you indicate when something ends on the next day?
generally though you can use dateadd()
DATEADD('n',{table.duration},{table.start_time})
Posted By: sanchezgmc06 — 17 May 2019 at 11:17am
The duration will usually be between 20 minutes to 4 hours (in minutes) and will not go into a different date.
Posted By: DBlank — 20 May 2019 at 2:28am
what is the data type of Start_time?
Duration is a number/int field type?
|