I am trying to create calendar entries for various events.
Some events cross midnight boundaries and some don't, depending on duration and starting times.
With a known Starting Date (StartDate), starting Time of Day (StartToD) and Duration in hours (DurationHours), how can I calculate the End Date (EndDate) and ending Time of Day (EndToD)?
eg: Start date and time = 2016-01-01 at 15:00hrs.
if the event duration is 20 hours, what is the end date and what is the ending time of day?
and if the duration is 3 hours, what is the end date and what is the ending time of day?
Many thanks in advance!