Labeling rows as greater/less than a date with JSL
Feb 24, 2017 6:37 PM(4744 views)
I have a dataset with a date column formatted dd/mm/yyyy hh:mm. In my script I want to be able to set a variable equal to some date and then have the script create a new column labelling all rows as being “before” of “after” the specified date.
The workaround I’m using is to format the variable and the column in seconds but it’s not easy to read.
Is there a way to keep the dd/mm/yyyy formatting when setting the variable in the script and also have it work in a formula?
This is the script that doesn’t work:
varProcessChange = 03/20/2016 00:01
colCondition = New Column (“Condition”)
<<data type (character)
<<Modeling Type (“Nominal”)
<<Set Formula (If(:Event Date < varProcessChange, “Before”, “After”)