AppLib CHAR TO TIME

From Eigenpedia

(Redirected from LucidDbAppLib CHAR TO TIME)
Jump to: navigation, search

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.

Date/Time Pattern table
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.

http://p4web.eigenbase.org/open/dev/luciddb/src/com/lucidera/luciddb/applib/datetime/StdConvertDateUdf.java

Personal tools