mteed11 Posted June 9, 2017 Posted June 9, 2017 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, Mike Quote
mteed11 Posted June 9, 2017 Author Posted June 9, 2017 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? Quote
step Posted June 9, 2017 Posted June 9, 2017 You could try this: var [date, cutOff] = [ Field("YOUR DATE FIELD HERE"), "6/13/2017" ].map(DateFromString); return date < cutOff ? "before value" : "after value"; Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.