cancel
Showing results for 
Search instead for 
Did you mean: 

Force Null Value for Date

hsattuwa
Rocketeer

Hi All,

What function could be used to Force Null value in a if() condition for data type as DATE/TIMESTAMP. I tried with NULL() and '' in the Argument 3 but it tells that data type is not same.

Here is the eg:
if(
and(
Inbound_Orders_SCO.Inbound_Orders.ELIGIBLE_FOR_SUP_VAL = 'Y',
OTM_GTM_MV.MV_ORDER_RELEASE_STATUS_PIVOT.OR_REVIEW = 'SBUX.OR REVIEW_COMPLETE'
),
date(
OTM_GTM.ORDER_RELEASE.EARLY_PICKUP_DATE
), NULL()
)

What else i can use in Argument 3 so if 1st is fulfilled i need argument2 else NULL value.

Thanks in advance.

2 REPLIES 2

shashidhar_sris
Partner
Partner

Hi,

In "IF" condition, the 2nd and 3rd arguments should be the same data type.

So you can use any future date ("9999-09-09") as 3rd argument.

shashidhar_sris_0-1701359164777.png

 

 

Regards,

Shashidhar.S

Or, you can also use expired date as 3rd argument like "1111-01-01"