Clovertech
› Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › How to add a date in MATH, Translation Configurator?
Translation from vrl => vrl
Function: ADD
Source
DateOfOrder
=1
Destination
DfltDlDate
This always adds 1 to the date, i.e. 20050710 => 20050711, but if the input is the end of month or year, it becomes: 20050131 => 20050132
What should I use?
Thanks in advance!
Sam 8)
You can’t do standard math on a date. Standard math uses Base 10, 8, or 16. Date math uses difefrent bases for month, day, tear, etc.
Use the Date math function with the clock command. for example:
set dt 20050712
set tomorrow [clock format [clock scan “$dt tomorrow”] -format %Y%m%d]
echo $tomorrow == 20050713
Charlie
It works like magic, thanks Charlie!
I will put either a CALL or write a tcl to do it.
Good day,
Sam 😛