Converting a date field from ISO standard | Community
Skip to main content
Travis_Schwartz
New Participant
April 27, 2020
Solved

Converting a date field from ISO standard

  • April 27, 2020
  • 1 reply
  • 1705 views

Hello,

 

I have a shiny new script token (thanks Sanford):

#foreach( $account in $account_cList ) #if( $account.description.equals("ARROWHEAD VISA") ) #set( $dueDate = $account.upcomingPaymentDate ) #break #end #end $dueDate

The problem is it displays the date like: YYYY MM, DD 
based on the fact that the company I work for is US based, I would like to convert it to be Month (name or abbreviated), Day Year.

 

Thanks.

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

Include all the header code from 

 

https://blog.teknkl.com/velocity-days-and-weeks/

 

Then

 

 

#set( $dueDateJ = $convert.parseDate($dueDate, $ISO8601DateOnly, $defaultLocale, $defaultTimeZone) ) ${date.format("MMM dd',' yyyy", $dueDateJ)}

 

 

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
April 28, 2020

Include all the header code from 

 

https://blog.teknkl.com/velocity-days-and-weeks/

 

Then

 

 

#set( $dueDateJ = $convert.parseDate($dueDate, $ISO8601DateOnly, $defaultLocale, $defaultTimeZone) ) ${date.format("MMM dd',' yyyy", $dueDateJ)}