Oracle SOA Suite (MOSC)

MOSC Banner

Javascript functions are not working in OSB console

I want to date 1. 10 days to the current date and format it as : 19 Sep, 2022.

Both of the below methods are not working. Is there any other options?

Method 1:

I added action: javascript and added below lines:

date = new Date();

const day = date.toLocaleString('default', { day: '2-digit' });

const month = date.toLocaleString('default', { month: 'short' });

const year = date.toLocaleString('default', { year: 'numeric' });

process.vFormattedSoftDeleteDate = "".concat(day,' ',month,',',year);

JSFiddle: 19 Sep, 2022

OSB Console : September 19, 2022 2:44:44 PM EDT.

Method 2:

var date = new Date();

var options = { year: 'numeric', month: 'short', day: 'numeric' };

process.formatedDate = date.toLocaleString('en-US', options);

jsfilddle : "Sep 19, 2022" , osb console : September 19, 2022 4:45:39 PM EDT

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center