6.22. Teradata Functions
These functions provide compatibility with Teradata SQL.
String Functions
char2hexint
(string) → varchar
Returns the hexadecimal representation of the UTF-16BE encoding of the string.
index
(string, substring) → bigint
Alias forstrpos()
function.
substring
(string, start) → varchar
Alias forsubstr()
function.
substring
(string, start, length) → varchar
Alias forsubstr()
function.
Date Functions
The functions in this section use a format string that is compatible withthe Teradata datetime functions. The following table, based on theTeradata reference manual, describes the supported format specifiers:
Specifier | Description |
---|---|
- / , . ; : |
Punctuation characters are ignored |
dd |
Day of month (1-31) |
hh |
Hour of day (1-12) |
hh24 |
Hour of the day (0-23) |
mi |
Minute (0-59) |
mm |
Month (01-12) |
ss |
Second (0-59) |
yyyy |
4-digit year |
yy |
2-digit year |
Warning
Case insensitivity is not currently supported. All specifiers must be lowercase.
tochar
(_timestamp, format) → varchar
Formatstimestamp
as a string usingformat
.
totimestamp
(_string, format) → timestamp
Parsesstring
into aTIMESTAMP
usingformat
.
todate
(_string, format) → date
Parsesstring
into aDATE
usingformat
.
原文: https://prestodb.io/docs/current/functions/teradata.html