Return Date( <> Working days)

hi everyone,

i have a Date field and i want to show a message if the user write a non-working day date(Saturdays and Sundays) inside this field, considering that the days of the week are 1 - 7 Monday - Sunday and the working days are 1 - 5 Monday until Friday.

please how can i do this?

i have started like this :

DayOfTheWeek(integer) := DATE2DWY(startdate,1);

You would be best making use of the Base Calendar where you can select which days are none working or in your case weekend, you can then simply reference the calendar and if the BOOLEAN is true then error.

This is my suggestion.

Regards

A

Hello,

You already wrote 50% of the code.
Integer := CALCDATE(startdate,1).

If integer>5 then MESSAGE('Non-working day).

should work,

best regards,