Hi everyone
I am trying to calculate the difference between the start date. And End date.
How to calculate, please help
thanks and regards
vednarayan
Hello Vednarayan.
There are multiple functions you can use to calculate the difference. You can have it in Days, Hours, Minutes or Seconds.
https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Logic/Built-in_Functions/Date_and_Time
If you need it has a DateTime, use the diffSeconds and calculate hours, minutes and seconds from it.
Seconds = DiffSeconds(StartDate,EndDate)
Time = NewTime(Trunc(Seconds/3600),Trunc(Mod(Seconds,3600)/60),Mod(Seconds,60))
I guess Vednarayan just need the days, so he could simply use the function:
DiffDays(dt1, dt2) returns the difference in days between 'dt1' and 'dt2'; i.e. how many days have passed between these two dates:
The Time component you provide in the parameters is ignored. The DiffDays function receives two Date Time parameters, and then replaces the Time component with 00:00:00.
Vednarayan, did this help? Let us know!