I received a request where the customer wants me to show how many hours the patient stayed in each month. Here is an example:Patient was here January 1st 2:00 pm and discharge February 2nd 1:00AM Should become like this: January: 730 hours (10 hours on January 1st + 30 days *24 hours per day) February 25 hours (24 hours on February 1st and 1 hour on February 2nd). If you cannot figure out a way, I would be greatly appreciated if you can at least provide me information how to calculate the number of hours patient stayed on first and last day (10 hours on January 1st and 1 hour on February 2nd). I have a way to calculate the hours between January 2nd and February 1st. I am having problems in getting the hours to midnight for first day and midnight to discharge datetime for the last day I tried intck with 'end', 'b' but I keep getting error messages. Here is sample of the checkin and checkout datetime CheckinDate: 01JAN2014:2:00:00PM CheckoutDate: 02FEB2014:1:00:00AM THis is a followup after this post I have posted This time the requester wants number of hours instead of number of days each month.
... View more