First I'm a novice so I'm not familiar with all the terms so please forgive me and use simple terms....sorry and thanks for the understanding.
I have LiveCycle Designer 8.0
I use to use excel and had a simple time in / time out time sheet, now my company switched to Adobe LiveCycle and I'm tring to put this together.
I've searched all the posts for days but kept getting confused and worst, none of them seem to work for me. Can someone write the script for me or explain it.
Here is what I have on my time sheet, I need a script to give me the times where it calculates itself, we use military time.
Time actually worked...Time In: 2100 / Time out: 1030 / Total hours = 13:30
Time scheduled to work...Time In: 2100 / Time Out: 0600 / Total hours = 9:00
Overtime worked = 4:30
Does your script work for any values?
If so, what values?
What happens when you use a start time of 21:00 and enter various end times like 23:00, 23:30 23:59, 00:00, 00:30?
Why do you think the elapsed time goes negative after 23:59?
Could it be that the end time is assumed to be the time on the same day as the start time and not the next day as you are assuming?
Time is not just a value between 0:00 (12:00 AM( and 24:00 (12:00 AM the next day) it is also the date for that time. So elapsed time is not just the difference between start time and end time but the difference of the end time and date and the start time and date. There is also time difference before and after an event for a given data and time so a negative elapsed time is a reasonable value under some situations.
LiveCycle Designer's documentation for the date and time functions refers to the number of days elapsed since the Epoch date (day conversions functions) and milliseconds since the Epoch date (time functions).
What is the Epoch date used by LiveCycle Designer?
It appears you will need to consider the actual date of the start and end dates along with the start and end time.
Many of the examples are asking for computing the elapsed time within a single date, so one can ignore the date except on the days that Day Light Savings Time starts or ends.
George Kaiser