RXS_charToTimestamp()
Use RXS_charToTimestamp() to easily convert a timestamp coming from an XML document (i.e. string representation of a timestamp) to a valid IBM i/RPG timestamp format. This will save the headache of programming for all of the different timestamp formats out there and doing a bunch of sub-stringing and concatenation.
Valid keywords for pFormat are listed below:
- yyyy = Year
- MM = Month
- dd = Day
- hh = Hour
- mm = Minute
- ss = Second
- SS = Millisecond
Typical usage would look like:
RXS_charToTimestamp(strTimestamp: 'yyyy-MM-dd-hh.mm.ss.SSSSSS': %Timestamp());
Subprocedure Prototype
|
Converts a character string to a timestamp value. |
|
Required Character string date/time data which is to be converted to a timestamp. Example: |
|
Required The format of the date/time character string. Example: |
|
Required Default, fallback return value that will be returned if the subprocedure cannot process the character string passed in the first parameter. Example: |