Extracts the number that indicates the day in a given date. If the received parameter is null, the value returned is 0.
Day(date-expression | datetime-expression)
Objects: Procedure, Transaction, Web Panel, Panel, Data Provider
Generators: .NET, .NET Framework, Java, Apple, Android,
A company wants to implement the following discount policy: All debts paid before the 21st of every month will have a 15% discount.
Consider the following Transaction object:
The following code is defined inside an Event of the Payment Transaction or a Web Panel with base table:
If day(PaymentDate) < 21
&Discount = PaymentAmount * 0.15
&Discount = 0
TimeZone Support - General Considerations