Modified Javascript

Is there any direct function available in Javascript to get the month in text format from the date?

Hi Sagar,

No, there is no direct function is available. You can get the month in numeric format with the help of getMonth() or month() function and then can use array to convert it into text format.

Hi,

you could try something like this in Modified Java Script Value Step:

var today = new Date();
var dd = today.getDate();
var month = new Array();
month[0] = “JAN”;
month[1] = “FEV”;
month[2] = “MAR”;
month[3] = “ABR”;
month[4] = “May”;
month[5] = “JUN”;
month[6] = “JUL”;
month[7] = “AGO”;
month[8] = “SET”;
month[9] = “OUT”;
month[10] = “NOV”;
month[11] = “DEZ”;
var mm = month[today.getMonth()];
var yyyy = today.getFullYear();

if(dd<10) {
dd = ‘0’+dd
}

if(mm<10) {
mm = ‘0’+mm
}
today = dd + ‘/’ + mm + ‘/’ + yyyy;