public class SqlFormatScanner extends Object
| Constructor and Description |
|---|
SqlFormatScanner()
The constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFormat(SqlFormat fmt)
Add a parsed SqlFormat to the set
|
SFDate |
parseDate(String str) |
SFDate |
parseDate(String str,
int cenBound)
Parse date using this list of formats (returns SFDate)
|
SFTime |
parseTime(String str)
Parse time of day using this format (returns SFTime)
|
SFTimestamp |
parseTimestamp(String str,
TimeZone tz) |
SFTimestamp |
parseTimestamp(String str,
TimeZone tz,
int cenBound)
Parse timestamp using this format (returns SFTimestamp)
|
String |
setFormats(int model,
String str)
Parse a format string with alternate input formats
|
public void addFormat(SqlFormat fmt)
fmt - parsed SqlFormatpublic String setFormats(int model, String str)
model - the format model (see SqlFormat)str - the format stringpublic SFDate parseDate(String str, int cenBound)
str - The string to parsecenBound - Century boundary for YY (1900-2100)public SFTime parseTime(String str)
str - The string to parsepublic SFTimestamp parseTimestamp(String str, TimeZone tz, int cenBound)
str - The string to parsetz - the timezone to use by defaultcenBound - Century boundary for YY (1900-2100)public SFTimestamp parseTimestamp(String str, TimeZone tz)
Copyright © 2020. All rights reserved.