public class CoerceToDateTime extends AbstractCoerceToDate
Date. If the value is not a Date, it
will use the Object.toString() method to convert the
resulting String to a Date object using the current locale default
formatter for DateTime through the
DateFormat#getDateTimeInstance(int) method
and the DateFormat.SHORT style for the date and the
DateFormat.MEDIUM style for the hour.| Constructor and Description |
|---|
CoerceToDateTime() |
| Modifier and Type | Method and Description |
|---|---|
protected java.text.DateFormat |
createFormatter(java.util.Locale locale)
Returns the
DateFormat to apply when the value to coerce is not
of Date type and it will be parsed as String. |
protected java.lang.String |
getDateType()
Returns the name of the Date type being coerced.
|
coerce, coerce, coerceprotected java.text.DateFormat createFormatter(java.util.Locale locale)
AbstractCoerceToDateDateFormat to apply when the value to coerce is not
of Date type and it will be parsed as String.createFormatter in class AbstractCoerceToDateDateFormat to apply to parse the value to coerce as
Stringprotected java.lang.String getDateType()
AbstractCoerceToDategetDateType in class AbstractCoerceToDate