Date format change | Community
Skip to main content
Level 2
August 25, 2020
Solved

Date format change

  • August 25, 2020
  • 1 reply
  • 1840 views

Hi,

 

Can I change the language of month? For example instead May in english, I'd like write in french (mai) or spanish (mayo). Is it possible too?

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 Manoj_Kumar

Hello @kumarg ,

 

You can download the moment.js from here.

Then upload this file in the Administration > Configuration > Javascript Codes. Use the Name as cus:moment.js.

Then in your workflow you can use this to get the translated output.

loadLibrary('cus:moment.js'); moment.locale('fr'); var stringMonth=moment().format('MMMM'); logInfo(stringMonth);

The Output will be French August which is août.

 

Thanks

 

 

1 reply

Manoj_Kumar
Community Advisor
Manoj_KumarCommunity AdvisorAccepted solution
Community Advisor
August 25, 2020

Hello @kumarg ,

 

You can download the moment.js from here.

Then upload this file in the Administration > Configuration > Javascript Codes. Use the Name as cus:moment.js.

Then in your workflow you can use this to get the translated output.

loadLibrary('cus:moment.js'); moment.locale('fr'); var stringMonth=moment().format('MMMM'); logInfo(stringMonth);

The Output will be French August which is août.

 

Thanks

 

 

Manoj  | https://themartech.pro