dDataDataRequired
Starting date for the calculation.
AdvPL GuideAdjustDate( <dData>, <nDias> ) --> dDataCalculates a date by moving forward or backward through business days.
AdjustDate() is used when a routine must move a date while respecting business days. It is common in due dates, operational deadlines and calculations that should avoid weekends or configured holidays.
AdjustDate( <dData>, <nDias> ) --> dDatadDataStarting date for the calculation.
nDiasNumber of business days to move. Use a negative value to go back.
#Include "TOTVS.ch"
User Function ExAdjustDate()
Local dDeadline := AdjustDate(Date(), 5)
MsgInfo("Calculated deadline: " + DToC(dDeadline))
ReturnCalculates a date five business days after the current date.
© 2026 Usina.BR. All rights reserved. TOTVS, Protheus, Microsiga and their respective logos are trademarks of their owners. AdvPL Guide is independent and uses limited, attributed excerpts justified by educational purposes. See the Terms of Use. Terms of Use
Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.