The normal and "standard" way to get Navision to return the weekday based on a date is to use the DATE2DWY function. But this function is actually not returning the weekday, just a number in the week (1=Monday etc.). This means that you have to handle this yourself including language handling etc.
Instead there is an easier way to get the information. Just create a little function like this. It uses the virtual Date table. Define the Date record as a variable and use it like this to return a weekday for any date.
GetWeekDay(WeekDate : Date) : Text
WITH Date DO BEGIN