I have used separate date and time which I can change. I need to spend more time with DateTime math. Here is a typical item: Date: 3/2/2016 Start: 11:30pm End: 8:00am next morning. That needs to convert to 3/2/2016, 23:30-24:00 and 3/3/16, 00:00-08:00. That date is important and start/stop times are Medicaid requirements. Tom Frederick President/CEO Elm City Center 1314 W Walnut Jacksonville, IL 62650 O-217-245-9504 F-217-245-2350 [email protected]<mailto:[email protected]>
From: [email protected] [mailto:[email protected]] On Behalf Of Albert Sent: Friday, March 04, 2016 2:23 PM To: Tom Frederick Subject: [RBASE-L] - Re: Midnight shift notes Even if he isn't he can calculate the two and do the math. If you have StartDate and StartTime and EndDate and EndTime, just calculate the two DATETIME values and subtract. Albert On 2016-03-04 1:11 PM, [email protected]<mailto:[email protected]> wrote: yes, but Tom doesn't mention whether he's keeping his data in DateTime columns or not... Karen -----Original Message----- From: Javier Valencia <[email protected]><mailto:[email protected]> To: karentellef <[email protected]><mailto:[email protected]> Sent: Fri, Mar 4, 2016 1:54 pm Subject: [RBASE-L] - Re: Midnight shift notes I agree. I use to have date and time as separate columns but now I have switched to DATETIME and avoid all the problems associated with elapsed times that span more than one day. Javier, Javier Valencia, PE O: 913-829-0888 H: 913-397-9605 C: 913-915-3137 From: [email protected]<mailto:[email protected]> [mailto:[email protected]<mailto:[email protected]?>] On Behalf Of Bruce Chitiea Sent: Friday, March 04, 2016 1:46 PM To: [email protected]<mailto:[email protected]> Subject: [RBASE-L] - Re: Midnight shift notes I like Albert's better. Bruce ------ Original Message ------ Sent: 3/4/2016 11:40:56 AM Subject: [RBASE-L] - Re: Midnight shift notes From: "Albert" <[email protected]<mailto:[email protected]>> To: [email protected]<mailto:[email protected]> Cc: For your purposes, you could calculate the full DATETIME value of the shift start and end, and then a simple (EndDateTime-StartDateTime) = Elapsed will give you the elapsed time. Said time will probably be in seconds, so minor adjustments would be necessary. Albert On 2016-03-04 12:11 PM, [email protected]<mailto:[email protected]> wrote: I've never had to do this. Would it help if you had 2 computed date columns that had a DEXTRACT of the start and end? I'm assuming you have 2 DateTime columns now? Because then if the 2 DEXTRACT columns are the same then you can simply do math of the time; if not then you add together 2 times, from beginning to midnight and then from midnight to end. Can't think of anything more elegant... Karen -----Original Message----- From: Tom Frederick mailto:[email protected] To: karentellef mailto:[email protected] Sent: Fri, Mar 4, 2016 12:35 pm Subject: [RBASE-L] - Midnight shift notes We have to track activity by shift and write a note for record purposes. All notes have a staff ID, topic, actual note, date and start/end times which provides proof of activity. Right now I can bill activity by a whole day, but a change to billing by the hour is coming. For day and evening shifts it is pretty easy. They stay same day and within a consecutive time frame. Overnight shifts have to deal with Midnight date/time changes to automatically split over two dates and make 24 hour clock time adjustments. I can check for overlap or bad start/stop times within the same date. Making adjustments for Midnight date/time is just not clicking in my head. Any suggestions are welcome. Tom Frederick President/CEO Elm City Center 1314 W Walnut Jacksonville, IL 62650 O-217-245-9504 F-217-245-2350 [email protected]<mailto:[email protected]><mailto:[email protected]>

