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. Here you must use the virtual Date table. Define the table as a variable and use it like this.
DateRec.GET(DateRec."Period Type"::Date,WORKDATE);MESSAGE(DateRec."Period Name");