public static class EtlVariable.DateUtils extends Object
Provides format/parse operation for date/time.
| Constructor and Description |
|---|
EtlVariable.DateUtils() |
| Modifier and Type | Method and Description |
|---|---|
String |
format(Date date,
String formatPattern)
Formats a specified date/time according to the specified pattern.
|
Date |
now()
Returns the current date.
|
String |
now(String formatPattern)
Returns a current date/time formatted according to the specified format.
|
Date |
parse(String dateStr,
String formatPattern) |
String |
today()
Returns the formatted representation of current date.
|
String |
today(String formatPattern)
A synonym for
now(String). |
public String now(String formatPattern)
formatPattern - format pattern as specified by SimpleDateFormat.SimpleDateFormat,
format(java.util.Date,String)public String format(Date date, String formatPattern)
date - date to format.formatPattern - format pattern as specified by SimpleDateFormat.public Date parse(String dateStr, String formatPattern) throws ParseException
ParseExceptionpublic Date now()
public String today()
Time part is skipped.
public String today(String formatPattern)
now(String).formatPattern - format pattern.Copyright © 2006-2012. All Rights Reserved.