Format Date Time In Oracle Integration Cloud
To format date and time in Oracle Integration Cloud (OIC), you can use the Expression Language (EL) to manipulate the date values. OIC uses EL expressions to perform various operations, including date formatting.
Here’s an example of how to format a date and time in Oracle Integration Cloud:
- Formatting the current date and time:
${now()}
This EL expression will return the current date and time in the default format.
- Formatting a specific date and time: Assuming you have a variable called
myDatethat contains the date and time value you want to format, you can use the following EL expression:
${formatDateTime(myDate, 'yyyy-MM-dd HH:mm:ss')}
In this example, myDate is the date and time value you want to format, and the format string 'yyyy-MM-dd HH:mm:ss' specifies the desired format.
Here are some common format symbols for date and time formatting in the formatDateTime function:
yyyy: Year with 4 digits (e.g., 2023)MM: Month with 2 digits (e.g., 09 for September)dd: Day of the month with 2 digits (e.g., 07)HH: Hour in 24-hour format with 2 digits (e.g., 13 for 1 PM)mm: Minute with 2 digits (e.g., 05)ss: Second with 2 digits (e.g., 42)