10-23-2019 11:26 AM
Hello,
I’m trying to get the name of the month from the date. Eg. today’s date is 10/23/2019, I want to get the month name October.
Can someone please give me the expression language syntax for this.
Thanks
10-23-2019 11:34 AM
Date.now().toLocaleDateString({“format”:“MMMM”})
https://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html
10-23-2019 11:53 AM
Thank you for your reply. I get this error message:
Could not compile expression: Date.now().toLocaleDateString( … (Reason: Invalid token: ‘“’ for expression: Date.now().toLocaleDateString( …; Resolution: Please check expression syntax)
Thanks
10-23-2019 12:11 PM
That’s an issue with copy and pasting from the Community. Replace the quotation marks after you paste it into SnapLogic so that you get straight quotation marks instead for the angled ones.
10-23-2019 12:32 PM
Thank you both very much. It worked! You are right the copy -paste messed up the quotation marks.
Appreciate the help from both of you!