I am having a little issue
I have a variable that allows the user to input a date (vTodate).
I then have variable (test) that converts the input to a number =Num(Date(vToDate,'M/D/YYYY'))
In my load script, I am doing Num(Date(TransactionDate,'M/D/YYYY')) as TransDateNum
I created 1 more variable (Include) =if(TransDateNum < $(test) ,'L','G')
The value is never L
Thanks for your assistance.
Solved! Go to Solution.
Is there something peculiar about your process that you're not telling us? It seems to work for me, at least at a preliminary level.
LET vToDate = Today()
LET vToDateNum = Num(Date(vToDate,'M/D/YYYY'))
TRACE 'vToDateNum' & $(vToDateNum)
LOAD *,If(TransactionDate2 < $(vToDateNum) ,'L','G') AS 'TestValue'
LOAD Num(Date(TransactionDate,'M/D/YYYY')) AS 'TransactionDate2'
LOAD * Inline
LET vNumberOfRows = NoOfRows('DATA')
Try using floor() instead of num(); not sure if the Date formatting actually strips the time value (if there is one).
I am assuming that you have all three items in a table with your data to see it's never 'L' when it should be.
The variable on in the application and not the load script. I am using a variable extension to capture the user input and store it in a variable. I then want to use that variable and compare it against a object in the table and store the result as a variable.
Odd this is the logic works fine as a master measure.