Sage X3 provide you inbuilt function to retrieve the number of day and name of day from given particular date. You just need to write one line of code as mentioned below.
New Stuff:How to auto populate the dimensions on Sales Order detail?
Syntax:
day(exp_date) : day extracts the day (number) from a date.
day$(date_exp): day$ returns the string that contains the name of the day in the current language.
day$ extracts the name of the day corresponding to a valid date. Its parameter can also be a numeric expression corresponding to the row of a day in the week. In this case, its value must be between one (1), Monday and seven (7), Sunday. If it is not, it is converted to the integer of the interval [1, 7] that is congruent to it.
The result type is Char.
Also read:
2)How to execute workflow through function?
3)How to use Hierarchical List functionality in Object browser