Oracle® Fusion Middleware Idoc Script Reference Guide 11g Release 1 (11.1.1) E10726-01 |
|
Previous |
Next |
Home > Idoc Script Reference Guide > Management and Configuratio... > parseDateWithPattern
Parses a date/time to a specified date/time pattern.
Dates convert to milliseconds when used with standard comparison operators. For example, the expression (60*60*1000)
equals one hour.
A common usage of this function is to adjust the current time using a multiplication expression that represents a number of seconds, minutes, hours, or days.
Type and Usage
Parameters
Takes two parameters:
The first parameter is a date string used by the Content Server, or a date object created with the parseDate or dateCurrent functions.
The second parameter is the date/time pattern, which is a standard Java SimpleDateFormat pattern string, such as MM/dd/yyyy.
Output
Returns a Java date object, which is converted to a string for display.
Example
Displays the current date and time in the format specified by the pattern (for example, Wed, 4 Jul 2001 12:08:56 -0700):
<$parseDateWithPattern(<$dateCurrent()$>,"EEE, d MMM yyyy HH:mm:ss Z")$>
See Also