that brings back a zero value.
If i change it to use a date instead of variable then i get a value of 139.
But i want this to work using a variable instead of hardcoding the date/
If I run the script, I get this variable definition back:
I think this is what you intend to get back, right?
If you say, you get a value of 139 back (resp. zero), I assume you mean you get this returned when using the variable in an e.g. text box expression, right?
I can imagine some issues with the set modifier format, 01/07/2012 00:00:00 is a timestamp format, while your standard DATE format is probably missing the time string.