View Full Version : Return value if date equal or greater than

June 9th, 2017, 06:06 AM
Good morning. I need to return one price value if a date is equal to or greater than 6/13/2017 and another value if it's less than that date. Any help would be greatly appreciated.

Thank you,


June 9th, 2017, 09:54 AM
I’m trying to write a code for a fusionpro template where if a date field is 6/13/2017 or later it returns “$6.99” and if it’s less than it returns “$4.99”. Is there an easy way to do this?

June 9th, 2017, 09:57 AM
You could try this:

var [date, cutOff] = [ Field("YOUR DATE FIELD HERE"), "6/13/2017" ].map(DateFromString);
return date < cutOff ? "before value" : "after value";