I am trying to create for a formula that compares dates. Below is the formula that I have created.
IF {SORDERP.YTP03EXPDAT_0} < {SORDERQ.EXTDLVDAT_0} then {SORDERQ.EXTDLVDAT_0} else (IF {SORDERP.YTP03EXPDAT_0} > # 12/30/29 # then 'TBA' else totext({SORDERP.YTP03EXPDAT_0}))
What I am trying to achieve is that the Expected Date is before the Ship Date, then to display the Ship Date, if not then if the Expected date if it is after the 30/12/2029 display TBA otherwise show the Expected date. Below are some examples of what I am trying to achieve.
IF {SORDERP.YTP03EXPDAT_0} < {SORDERQ.EXTDLVDAT_0} then {SORDERQ.EXTDLVDAT_0} else (IF {SORDERP.YTP03EXPDAT_0} > # 12/30/29 # then 'TBA' else totext({SORDERP.YTP03EXPDAT_0}))
What I am trying to achieve is that the Expected Date is before the Ship Date, then to display the Ship Date, if not then if the Expected date if it is after the 30/12/2029 display TBA otherwise show the Expected date. Below are some examples of what I am trying to achieve.
TPG Expected Date | Ship Date | What to Show |
01/10/24 | 07/10/24 | 07/10/24 |
14/10/24 | 08/10/24 | 14/10/24 |
31/12/29 | 09/10/24 | TBA |