Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
55
Working hours extending in two consecutive days
posted

I've got to set the working hours for a restaurant.  The shifts run from 9:30 AM to  3:00 PM and from 6:30 PM to 01:30 AM on the following day. Actually, on Fridays and Saturdays, the shift is extended to 04:00 AM.

Even if the shift extends in workday + 1, it should still be considered as being part of workday 1

I've set the logical day offset to +4 hours, and that's fine.

I haven't been able, though, to figure out a way of defining working hours that span over two consecutive days.

This works fine:

Dim dayOfWeek As Infragistics.Win.UltraWinSchedule.DayOfWeek

dayOfWeek = Me.UltraCalendarInfo1.DaysOfWeek(DayOfWeekEnum.Monday)

dayOfWeek.WorkDayStartTime = DateTime.Today.Date.AddHours(8.0F)

dayOfWeek.WorkDayEndTime = DateTime.Today.Date.AddHours(23.99F)

This doesn't work at all:

Dim dayOfWeek As Infragistics.Win.UltraWinSchedule.DayOfWeek

dayOfWeek = Me.UltraCalendarInfo1.DaysOfWeek(DayOfWeekEnum.Monday)

dayOfWeek.WorkDayStartTime = DateTime.Today.Date.AddHours(8.0F)

dayOfWeek.WorkDayEndTime = DateTime.Today.Date.AddHours(4.00F)

Any idea? Thanks