public class DateFormatter extends Object
Parsing is done using the
Joda time library which uses a similar format to that described in
SimpleDateFormat. Most specifiers compatible with the JDK will
be compatible with Joda time, the notable exceptions being:
| Constructor and Description |
|---|
DateFormatter(DateTimeFormatting format,
String nullIndicator)
Creates a formatter using the specified format.
|
DateFormatter(String pattern)
Creates a formatter using the specified format.
|
| Modifier and Type | Method and Description |
|---|---|
String |
format()
Formats the current value of the source as a text value.
|
void |
setSource(ScalarValued source)
Sets the container holding values to be formatted.
|
public DateFormatter(String pattern)
pattern - the output format to usepublic DateFormatter(DateTimeFormatting format, String nullIndicator)
format - the output format to usenullIndicator - the text value to use for null valuespublic final void setSource(ScalarValued source)
TokenFormattersetSource in interface TokenFormattersource - the value container to formatpublic final String format()
TokenFormatterformat in interface TokenFormatterCopyright © 2020 Actian Corporation. All rights reserved.