public class DateUtil
extends java.lang.Object
Constructor and Description |
---|
DateUtil() |
Modifier and Type | Method and Description |
---|---|
static int |
dateOfInteger(long days)
Replacement for function 'date-of-integer'
converts a date in the Gregorian calendar from integer date form to standard date form (YYYYMMDD).
|
static java.lang.String |
dateTo21Symbol(java.util.Date d)
Returns the full date/time
|
static int |
dayOfInteger(long days)
Replacement for function 'day-of-integer' in MicroFocus
|
static java.lang.String |
getDb2Date()
returns a 10 digit date string in DB2 format : e.g.
|
static java.lang.String |
getDb2TimeStamp()
returns a 26 digit date-time string in DB2 format : e.g.
|
static java.lang.String |
getDb2TimeStamp(ISMBean sqlca)
returns a 26 digit date-time string in DB2 format : e.g.
|
static java.lang.String |
getSMTimeStamp()
SoftwareMining time Stamp yyyy-MM-dd.HH-mm-ss-SSS- used internally / for creating time-labeled output directories
|
static int |
getYYYYOfYear(int twoDigitYear)
Translation of FUNCTION YEAR-TO-YYYY.
|
static int |
integerOfDate(long date)
The INTEGER-OF-DATE function converts a date in the Gregorian calendar from standard date form (YYYYMMDD) to integer date form.
|
static int |
integerOfDate(java.lang.String date)
The INTEGER-OF-DATE function converts a date in the Gregorian calendar from standard date form (YYYYMMDD) to integer date form.
|
static int |
integerOfDay(long date)
SAS 11.03.2009
|
static java.lang.String |
toDb2DateFormat(java.sql.Timestamp timeStamp) |
public static final java.lang.String dateTo21Symbol(java.util.Date d)
d
- : date
public static final int integerOfDate(long date)
date
- - Must be an integer of the form YYYYMMDD, whose value is retrieveed from the calculation (YYYY * 10,000) + (MM * 100) + DD,
where:
YYYY represents the year in the Gregorian calendar. It must be an integer greater than 1600, but not greater than 9999.
MM represents a month and must be a positive integer less than 13.
DD represents a day and must be a positive integer less than 32, provided that it is valid for the specified month and year combination.public static final int integerOfDate(java.lang.String date)
date
- - Must be an integer of the form YYYYMMDD, whose value is retrieveed from the calculation (YYYY * 10,000) + (MM * 100) + DD,
where:
YYYY represents the year in the Gregorian calendar. It must be an integer greater than 1600, but not greater than 9999.
MM represents a month and must be a positive integer less than 13.
DD represents a day and must be a positive integer less than 32, provided that it is valid for the specified month and year combination.public static final int integerOfDay(long date)
public static final int dateOfInteger(long days)
days
- - positive integer that represents a number of days succeeding December 31, 1600, in the Gregorian calendar.
The valid range is 1 to 3,067,671, which corresponds to dates ranging from January 1, 1601 thru December 31, 9999.public static final int dayOfInteger(long days)
public static final int getYYYYOfYear(int twoDigitYear)
twoDigitYear
- public static java.lang.String getDb2TimeStamp()
SET :WS-DATE-TIME = CURRENT TIMESTAMPOr from Java:
SELECT CURRENT TIMESTAMP from FROM SYSIBM.SYSDUMMY1
public static java.lang.String getDb2TimeStamp(ISMBean sqlca)
SET :WS-DATE-TIME = CURRENT TIMESTAMPOr from Java:
SELECT CURRENT TIMESTAMP from FROM SYSIBM.SYSDUMMY1
public static java.lang.String getDb2Date()
SET :WS-DATE-TIME = CURRENT DATEOr from Java:
SELECT CURRENT DATE from FROM SYSIBM.SYSDUMMY1
public static java.lang.String toDb2DateFormat(java.sql.Timestamp timeStamp)
public static java.lang.String getSMTimeStamp()
Copyright SoftwareMining. All Rights Reserved.