|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.ibm.as400.access.DateTimeConverter
The DateTimeConverter class represents a converted date and time. The AS/400 System API QWCCVTDT is used to convert a date and time value from one format to another format.
| Constructor Summary | |
DateTimeConverter(AS400 system)
Constructs a DateTimeConverter object. |
|
| Method Summary | |
java.util.Date |
convert(byte[] data,
java.lang.String inFormat)
Returns a converted Date object. |
byte[] |
convert(byte[] data,
java.lang.String inFormat,
java.lang.String outFormat)
Converts date and time values from the input format to the requested output format. |
byte[] |
convert(java.util.Date date,
java.lang.String outFormat)
Returns the converted date and time in a byte array. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DateTimeConverter(AS400 system)
system - The AS/400 system.| Method Detail |
public byte[] convert(byte[] data,
java.lang.String inFormat,
java.lang.String outFormat)
throws AS400SecurityException,
ErrorCompletingRequestException,
java.lang.InterruptedException,
java.io.IOException,
ObjectDoesNotExistException
data - The date and time value to be converted.inFormat - The input date and time format.
Possible values are:
outFormat - The output date and time format.
Possible values are:
AS400SecurityException - If a security or authority error
occurs.
ErrorCompletingRequestException - If an error occurs before
the request is completed.
java.lang.InterruptedException - If this thread is interrupted.
java.io.IOException - If an error occurs while communicating with
the AS/400.
ObjectDoesNotExistException - If the AS/400 object does not
exist.
public java.util.Date convert(byte[] data,
java.lang.String inFormat)
throws AS400SecurityException,
ErrorCompletingRequestException,
java.lang.InterruptedException,
java.io.IOException,
ObjectDoesNotExistException
data - The date and time value to be converted.inFormat - The format of the date and time value being provided.
Possible values are:
AS400SecurityException - If a security or authority error
occurs.
ErrorCompletingRequestException - If an error occurs before
the request is completed.
java.lang.InterruptedException - If this thread is interrupted.
java.io.IOException - If an error occurs while communicating with
the AS/400.
ObjectDoesNotExistException - If the AS/400 object does not
exist.
public byte[] convert(java.util.Date date,
java.lang.String outFormat)
throws AS400SecurityException,
ErrorCompletingRequestException,
java.lang.InterruptedException,
java.io.IOException,
ObjectDoesNotExistException
date - The Date object to be converted.outFormat - The format of the returned date and time value.
Possible values are:
AS400SecurityException - If a security or authority error
occurs.
ErrorCompletingRequestException - If an error occurs before
the request is completed.
java.lang.InterruptedException - If this thread is interrupted.
java.io.IOException - If an error occurs while communicating with
the AS/400.
ObjectDoesNotExistException - If the AS/400 object does not
exist.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||