What format does the date have to be in to do hour difference calculation.
Right now, I have it as 03/01/2022T6:45:00 PM as an example.
I looked at the post about the java script I could run where you have date 1 and time 1 in different columns. but it looks like the function merges them to 1 with the T in the middle and then does the subtraction. Why could I not get the date set up correctly first and do a simple calculation?
return ( new Date( $(date2) + ‘T’ + $(time2) ) - new Date( $(date2) + ‘T’ + $(time2) ) ) / ( 1000 * 60 * 60 );
I have shifts Im trying to understand. I have a start date/time and end date/time that im trying to subtract from each other to get hours worked.
The original data looks like this.
Start time: 3/15/2022 6:45:00 AM
End Time: 3/15/2022 6:45:00 PM