Tag name: <amc:convertDateTime>
type: oracle.adf.rich.DateTime
Converts string into java.util.Date and vice versa based on the pattern
and style set.
The default dateStyle is shortish.
Shortish is identical to short but forces the year to be
a full four digits. dateStyle defaults to shortish
if it was not set.
Timezone can be set per web-app in adf-faces-config.xml configuration file.
If timeZone is not set on the converter, then timezone will be defaulted to the
value set in adf-faces-config.xml configuration file. If it is not set in the
configuration file, then it will be defaulted to GMT.
The converter always allows a level of leniency while converting
user input value to date to the following extent.
For example:
When pattern on the converter is set to "MMM/d/yyyy" the following inputs
are tolerated as valid by the converter.
The converter supports the same parsing/formatting conventions as the JDK SimpleDateFormat (specified using the dateStyle, timeStyle and pattern attributes) except:
This converter provides a format hint for the help framework, which cannot be turned off.
This converter is automatically registered under the standard
converter ID, and therefore will be used when the
<f:convertDateTime> tag is used.
This converter also runs on the client (implements org.apache.myfaces.trinidad.convert.ClientConverter).
If you derive a class from amc:convertDateTime, it will not work with amc:inputDate unless you also implement ClientConverter.
<amc:inputText id="mdf5" value="2004/09/06" label="Date"> <amc:convertDateTime pattern="yyyy/M/d" secondaryPattern="d/M/yyyy" /> </amc:inputText>
| Name | Type | Supports EL? | Description |
|---|---|---|---|
| dateStyle | String | Yes |
Specifies the predefined formatting style that determines how the date component of a date string is to be formatted and parsed. Applied only if type is set to "date" or "both". Valid values:
|
| pattern | String | Yes | Specifies a custom formatting pattern that determines how the date/time string should be formatted and parsed. The syntax must conform to the rules specified by java.text.SimpleDateFormat. |
| timeStyle | String | Yes |
Specifies the predefined formatting style that determines how the time component of a date string is to be formatted and parsed. Applied only if type is "time" or "both". Valid values:
|
| type | String | Yes |
Specifies what content the string value will be formatted to include, or parsed. Valid values:
|