As usual, something I am not understanding... but it's going "wrong".... (read, I am not getting the results I am expecting to get )
From this thread:
I got the idea to use a foreign symbol for getting my past expiration dates.
frg = Foreign("VX_expirationDT","C", 0) == 1;
dt = DateTime();
expiration_date = ValueWhen(frg==1, dt, 0);
Filter = 1;
AddColumn( expiration_date , "expiration_date", 1.4);
that is how I put that into code. The expiration date I later want to use to calculate "day's since expiry".
However, the result is something I don't understand and have no idea how to fix.
Two things are not as expected:
-
the result is not returning a date but a very long number....
-
The numbers don't change on the 20-10-2021 even though 19-10-2021 is in the foreign symbol.
Any help pointing me in the direction of what I am not understanding appreciated, thanks in advance.