
Anonymous Community User asked a question.
Format Date through Relationship
I am trying to format a date using moment.js. What I would like to use is moment(@all of date).format('L') or something similar in after the .format where I can pluck out what I need to pluck out the GMT time, Year etc. I always get an invalid date response when I use this method, HOWEVER, if I create two fields and in the first field use @all of date.join() and in another field use moment(@date).format('L) the moment.js scripting works fine. Basically, I am using this to build a report for later, and the date field will sometimes be empty, and I'd just rather have the field be empty instead of saying "invalid date". I think this would work fine, if I could condense this method down to one field instead of the two like it is now. Any ideas?