Returns the number associated to a day of the week. (Sunday = 1). The value 0 is returned if the received parameter is null.
Date | DateTime.DayOfWeek()
Type returned:
Numeric(1)
Data Types: Date, DateTime
Consider the following Transaction object:
Purchase
{
PurchaseId*
PurchaseDate
Line
{
PurchaseLineId*
PurchaseLineDescription
PurchaseLineOriginalPrice
PurchaseLinePriceWithDiscount
}
}
If you want to apply a 15% discount for purchases made on Monday or Tuesday, you can define the following Rule in the Purchases Transaction:
PurchaseLinePriceWithDiscount = PurchaseLineOriginalPrice * 0.85 if &Today.DayOfWeek()=2 or &Today.DayOfWeek()=3;
TimeZone Support - General Considerations
DoW function
CDoW function