Class SapDateTimeAdapter
- java.lang.Object
-
- com.redwood.scheduler.api.connector.sap.rfc.scripting.util.SapDateTimeAdapter
-
public class SapDateTimeAdapter extends Object
Adapter for converting date and time fields in SAP format toDateTimeZone
-
-
Constructor Summary
Constructors Constructor Description SapDateTimeAdapter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DateTimeZone
toDateTimeZone(String sapDate, String sapTime, TimeZone timeZone)
Convert SAP date in the format YYYYMMDD and time in the format HHMMSS to an instance ofDateTimeZone
static DateTimeZone
toDateTimeZone(String sapDateTime, TimeZone timeZone)
Convert a SAP time stamp in the format YYYYMMDDHHMMSS to an instance ofDateTimeZone
static String
toSapDate(DateTimeZone dtz)
Convert an instance ofDateTimeZone
to SAP date in the format YYYYMMDDstatic String
toSapDateTime(DateTimeZone dtz)
Convert an instance ofDateTimeZone
to SAP time stamp in the format YYYYMMDDHHMMSSstatic String
toSapTime(DateTimeZone dtz)
Convert an instance ofDateTimeZone
to SAP time in the format HHMMSS
-
-
-
Method Detail
-
toDateTimeZone
public static DateTimeZone toDateTimeZone(String sapDateTime, TimeZone timeZone)
Convert a SAP time stamp in the format YYYYMMDDHHMMSS to an instance ofDateTimeZone
- Parameters:
sapDateTime
- time stamp in the format YYYYMMDDHHMMSStimeZone
- time zone of the SAP time stamp- Returns:
- instance of
DateTimeZone
-
toDateTimeZone
public static DateTimeZone toDateTimeZone(String sapDate, String sapTime, TimeZone timeZone)
Convert SAP date in the format YYYYMMDD and time in the format HHMMSS to an instance ofDateTimeZone
- Parameters:
sapDate
- date in the format YYYYMMDDsapTime
- time in the format HHMMSStimeZone
- time zone of the SAP time stamp- Returns:
- instance of
DateTimeZone
-
toSapDate
public static String toSapDate(DateTimeZone dtz)
Convert an instance ofDateTimeZone
to SAP date in the format YYYYMMDD- Parameters:
dtz
- instance ofDateTimeZone
- Returns:
- SAP date in the format YYYYMMDD
-
toSapTime
public static String toSapTime(DateTimeZone dtz)
Convert an instance ofDateTimeZone
to SAP time in the format HHMMSS- Parameters:
dtz
- instance ofDateTimeZone
- Returns:
- SAP time in the format HHMMSS
-
toSapDateTime
public static String toSapDateTime(DateTimeZone dtz)
Convert an instance ofDateTimeZone
to SAP time stamp in the format YYYYMMDDHHMMSS- Parameters:
dtz
- instance ofDateTimeZone
- Returns:
- SAP time stamp in the format YYYYMMDDHHMMSS
-
-