mteed11 Posted June 9, 2017 Share 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 Link to comment Share on other sites More sharing options...
mteed11 Posted June 9, 2017 Author Share 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 Link to comment Share on other sites More sharing options...
step Posted June 9, 2017 Share 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 Link to comment Share on other sites More sharing options...
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.