Hello Everyone,
I have a quick question. Just want to see if there is any function in “column expression node” which can give me a date difference. Example - i have two date column. I want to find the difference in days from those two column. I have added a snap shot from different ETL tool where I used to perform similar operation in their equivalent tool.
In the snap shot below, i pass a condition in the function and if it is true pass one value or else pass the other value. On of the argument is getting a result from the datedifference function.
For now i am using the “Date & time difference” node to achieve the below condition. However, i need to do this multiple time with multiple different condition. Was hoping to find something that i can use it in column expression tool.
If you really want a one-node solution, you are better off with a Java Snippet in this case. It’s similar to the Column Expression but has a bit more features.
Let’s assume this sample:
If you want to calculate to difference based on the number of days, you can use:
int diff = Math.abs(c_OrderDate.until(c_Today).getDays());