AppLib CHAR TO TIME
From Eigenpedia
(Redirected from LucidDbAppLib CHAR TO TIME)
Contents |
Syntax
APPLIB.CHAR_TO_TIME ( format, timeString )
Purpose
Converts a string to a time, according to the specified format string.
Input
- format [VARCHAR(65535)]: the time formatting which is used by the given time string
- timeStrimg [VARCHAR(65535)]: the string to be converted into a time
Format string syntax
The format string is a combination of time patterns. Only certain combinations of time patterns are supported. The time patterns are case-sensitive sequences of letters which represent a time or time field.
| Field | Form/Pattern | Notes |
|---|---|---|
| Hour (1-12) | hh (2 digits) | single digits will be padded with 0 (ie. 03, 04) |
| Hour (1-12) | h (1 or 2 digits) | single digits will not be padded with 0 (ie, 3, 4) |
| Hour (1-24) | kk (2 digits) | single digits will be padded with 0 (ie. 03, 04) |
| Hour (1-24) | k (1 or 2 digits) | single digits will not be padded with 0 (ie, 3, 4) |
| Minute | mm | |
| Second | ss | |
| AM/PM | a |
Example
| SQL | RESULT |
|---|
Untried/Untested functionality
The functionality listed under this section has not been fully tested and is not considered supported at this time. The expected behavior for the usage patterns below have not been well-specified and they should be used at your own risk.
- This functions uses [java.text.SimpleDateFormat] for parsing, check the documentation for further possible patterns

