OL Learn

Date format in a snippet

Hi - I am using a snippet with a variable data field for the date. I have it formatted as such in the text script - formatter.dateLong(field). This works fine and displays as January 1, 2022 if I use the field anywhere in the print section. However when I use the date field in a snippet it shows as Sat Jan 01 2022 00:00:00 GMT-0500 (EST).

How do I get the date in the snippet to read the same as it does in the document? My date format in the .csv file is 1-Jan-22?

Thank you

Scripts are executed in the order in which they appear in the Scripts pane. I suggest to check the order and make sure that the Text script is executed after the one used for loading the snippet.


Thank you . I checked that and @EffDate@ (which is used in the snippet also) is located well before the script to load the snippet.

Did moving that script down in the list solved the problem?