Calculate time between 2 TDateTime, with a twist
问题 I need to find out how to get the time between 2 times, but only if it is within work hours(Stored in a database) This is what I got for now, but it is totally wrong. the total won't bee correct. int __fastcall Organisasjon::CalculateResponsetimeInOpeninghours(std::auto_ptr<DBCommand> cmd, long orgid, TDateTime starttimeIn, TDateTime endtimeIn) { int totalTimeInQueue = 0; String sIsWorkDay = ""; String s = "SELECT o.isworkday, o.workdate, o.workstarttime, o.workendtime " \ "FROM orgwdexcep o