Please be sure you’ve read the docs and API specs before asking for help. Also, please be sure you’ve searched the forum for your answer before you create a new topic.
Is there a good way to handle mathematical operations in the velocity script part of a transfrom?
#{else}Nobody wins— Empl Exp Date = $expirationDate, Student Exp Date = $studentExpirationDate#end"
It is outputting the value:
Nobody wins— Empl Exp Date = 133525332000000000, Student Exp Date = 133817364000000000
To work around this I think I can do a date math comparison, as they are both in WIN32 format. But I don’t seem to be able to figure out how to convert it to a numerical value and then do a greater than comparison.
Where are you doing these calculations? Your example does not looks like it is part of a transform.
As mentioned by @iamnithesh, i would look at the Date Compare transform if both of your values are ISO dates, as that is what is needed for the DateCompare. If they are not, consider using the DateFormat transform to convert the value to the ISO format first.
To handle your case, you may need to nest two DateCompares since you need the 3 options (gt, eq, and lt).
Yeah, working on a date compare. But still curious how you might handle math operations in a transform.
The below isn’t working, I suspect it doesn’t like taking the input in the WIN32 format.
My original transform is working without this section, but once I try to test it with this section it starts failing with the studentExpirationDate variable.