This formula performs a calculation in days and excludes weekends. Some of the calculations come out to zero because the dates are the same. However, I need to know the differences in minutes and seconds when the dates are the same.
//DateDiff ("s",DateTimeValue ({EpisodeTests.DateAuth},{EpisodeTests.TimeAuth}),
//DateTimeValue ({Episodes.ReportDate},{Episodes.ReportTime}))/60/60
Local DateTimeVar d1 := {EpisodeTests.DateAuth};
Local DateTimeVar d2 := {Episodes.ReportDate};
DateDiff ("d", d1, d2) -
DateDiff ("ww", d1, d2, crSaturday) -
DateDiff ("ww", d1, d2, crSunday)
In the database, I have the following fields:
EpisodesTests.DateAuth (Date)
EpisodesTests.TimeAuth (Time)
Episodes.ReportDate (Date)
Episodes.ReportTime (Time)
I am ok with changing the difference to minutes or seconds vs. days.