The functions in this section use a format string that is compatible with
the Teradata datetime functions. The following table, based on the
Teradata 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
Case insensitivity is not currently supported. All specifiers must be lowercase.
to_char
to_char(timestamp, format) -> varchar
Formats timestamp as a string using format.
to_timestamp
to_timestamp(string, format) -> timestamp
Parses string into a TIMESTAMP using format.
to_date
to_date(string, format) -> date
Parses string into a DATE using format.
Was this page helpful?
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Upsolve AI","colors":{"primary":"#F13470","light":"#F13470","dark":"#E05883"},"favicon":"https://mintcdn.com/upsolve/uJJfNnm4qkd0qTuD/favicon.svg?fit=max\u0026auto=format\u0026n=uJJfNnm4qkd0qTuD\u0026q=85\u0026s=57743e080022ecdee9a3d16dc270ee80","logo":{"light":"https://mintcdn.com/upsolve/2iK7L-lfLcwqCcz_/logo/light_logo.svg?fit=max\u0026auto=format\u0026n=2iK7L-lfLcwqCcz_\u0026q=85\u0026s=e2c715b3dad371be16e683c74655b2a8","dark":"https://mintcdn.com/upsolve/2iK7L-lfLcwqCcz_/logo/dark_logo.svg?fit=max\u0026auto=format\u0026n=2iK7L-lfLcwqCcz_\u0026q=85\u0026s=e5b53eb0a41de94b806015890a6b4bdc","href":"https://upsolve.ai/?utm_source=docs\u0026utm_medium=logo\u0026utm_campaign=docs"},"api":{"openapi":["api-reference/upsolve.documentation.yaml"],"mdx":{"server":"https://api.upsolve.ai","auth":{"method":"bearer","name":null}}},"navbar":{"links":[{"label":"Support","href":"mailto:support@upsolve.ai"}],"primary":{"type":"button","label":"Start free","href":"https://ai-hub.upsolve.ai/?utm_source=docs\u0026utm_medium=navbar\u0026utm_campaign=docs\u0026utm_content=start_free"}},"seo":{"metatags":{"slack-app-id":"A0C9DAKJQ49"},"indexing":"navigable"},"footer":{"socials":{"website":"https://upsolve.ai/?utm_source=docs\u0026utm_medium=footer\u0026utm_campaign=docs","linkedin":"https://www.linkedin.com/company/upsolveai","hacker-news":"https://www.ycombinator.com/companies/upsolve-ai"}},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Impact Studies","href":"https://upsolve.ai/impact-study?utm_source=docs\u0026utm_medium=sidebar\u0026utm_campaign=docs","icon":"newspaper"},{"anchor":"Security Trust Center","href":"https://trust.upsolve.ai/?utm_source=docs\u0026utm_medium=sidebar\u0026utm_campaign=docs","icon":"shield-halved"},{"anchor":"Community","href":"https://upsolve-ai-community.slack.com/join/shared_invite/zt-2x9oospxx-vv2uDP_20IafkekwCOMi4A#/shared-invite/email","icon":"slack"},{"anchor":"Blog","href":"https://upsolve.ai/blog?utm_source=docs\u0026utm_medium=sidebar\u0026utm_campaign=docs","icon":"newspaper"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"upsolve","hasAudioNarration":false,"actualSubdomain":"upsolve","customDomains":["docs.upsolve.ai"],"gitSource":{"type":"github","owner":"upsolve-labs","repo":"upsolve-core","deployBranch":"main","contentDirectory":"apps/docs","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b05d02367c1c3f2678b4de8","clientVersion":"0.0.4286","searchFilterCounts":[{"language":"default","tag":"API Reference","count":161},{"language":"default","tag":"API Documentation","count":160},{"language":"default","tag":"Integrations","count":116},{"language":"default","tag":"Documentation","count":54},{"language":"default","tag":"SQL Reference","count":48},{"language":"default","tag":"Canvases","count":29},{"language":"default","tag":"Workspace draft","count":29},{"language":"default","tag":"Test cases \u0026 runs","count":24},{"language":"default","tag":"Functions","count":23},{"language":"default","tag":"Analytics Layer","count":22}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"sql/functions/teradata","slug":"/sql/functions/teradata","pageMetadata":{"title":"Teradata functions","description":null,"href":"/sql/functions/teradata"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`These functions provide compatibility with Teradata SQL.`}),`\n`,_jsx(Heading,{level:`2`,id:`string-functions`,children:`String functions`}),`\n`,_jsx(Heading,{level:`3`,id:`char2hexint`,children:`char2hexint`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`char2hexint(string) -> varchar`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`Returns the hexadecimal representation of the UTF-16BE encoding of the string.`}),`\n`,_jsx(Heading,{level:`3`,id:`index`,children:`index`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`index(string, substring) -> bigint`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`Alias for `,_jsx(_components.a,{href:`/sql/functions/string#strpos`,children:`strpos()`}),` function.`]}),`\n`,_jsx(Heading,{level:`2`,id:`date-functions`,children:`Date functions`}),`\n`,_jsx(_components.p,{children:`The functions in this section use a format string that is compatible with\nthe Teradata datetime functions. The following table, based on the\nTeradata reference manual, describes the supported format specifiers:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Specifier`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`- / , . ; :`})}),_jsx(_components.td,{children:`Punctuation characters are ignored`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`dd`})}),_jsx(_components.td,{children:`Day of month (1-31)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`hh`})}),_jsx(_components.td,{children:`Hour of day (1-12)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`hh24`})}),_jsx(_components.td,{children:`Hour of the day (0-23)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`mi`})}),_jsx(_components.td,{children:`Minute (0-59)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`mm`})}),_jsx(_components.td,{children:`Month (01-12)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ss`})}),_jsx(_components.td,{children:`Second (0-59)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`yyyy`})}),_jsx(_components.td,{children:`4-digit year`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`yy`})}),_jsx(_components.td,{children:`2-digit year`})]})]})]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Case insensitivity is not currently supported. All specifiers must be lowercase.`})}),`\n`,_jsx(Heading,{level:`3`,id:`to_char`,children:`to_char`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`to_char(timestamp, format) -> varchar`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`Formats `,_jsx(_components.code,{children:`timestamp`}),` as a string using `,_jsx(_components.code,{children:`format`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`to_timestamp`,children:`to_timestamp`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`to_timestamp(string, format) -> timestamp`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`Parses `,_jsx(_components.code,{children:`string`}),` into a `,_jsx(_components.code,{children:`TIMESTAMP`}),` using `,_jsx(_components.code,{children:`format`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`to_date`,children:`to_date`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`to_date(string, format) -> date`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`Parses `,_jsx(_components.code,{children:`string`}),` into a `,_jsx(_components.code,{children:`DATE`}),` using `,_jsx(_components.code,{children:`format`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Teradata functions","description":null,"href":"/sql/functions/teradata"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"String functions","slug":"string-functions","depth":2,"children":[{"title":"char2hexint","slug":"char2hexint","depth":3,"children":[]},{"title":"index","slug":"index","depth":3,"children":[]}]},{"title":"Date functions","slug":"date-functions","depth":2,"children":[{"title":"to_char","slug":"to_char","depth":3,"children":[]},{"title":"to_timestamp","slug":"to_timestamp","depth":3,"children":[]},{"title":"to_date","slug":"to_date","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"subdomain":"upsolve","siteName":"Upsolve AI","title":"Teradata functions - Upsolve AI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-16T21:24:38.093Z","originalFileLocation":"sql/functions/teradata.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Upsolve AI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/upsolve/97yzI2eDoRqG7EuN/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/upsolve/97yzI2eDoRqG7EuN/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/upsolve/97yzI2eDoRqG7EuN/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/upsolve/97yzI2eDoRqG7EuN/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/upsolve/97yzI2eDoRqG7EuN/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/upsolve/97yzI2eDoRqG7EuN/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/upsolve/97yzI2eDoRqG7EuN/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/upsolve/97yzI2eDoRqG7EuN/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/upsolve/97yzI2eDoRqG7EuN/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Teradata functions - Upsolve AI\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Upsolve AI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.upsolve.ai/sql/functions/teradata\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://upsolve.mintlify.site/_mintlify/api/og/v2?division=Functions\u0026amp;title=Teradata+functions\u0026amp;theme=4ad9ec435a983944c0d6a45c\u0026amp;signature=665243ed2f4e726d80143b094be0f55dbd3d52a26430041557576085ec72e512\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Teradata functions - Upsolve AI\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://upsolve.mintlify.site/_mintlify/api/og/v2?division=Functions\u0026amp;title=Teradata+functions\u0026amp;theme=4ad9ec435a983944c0d6a45c\u0026amp;signature=665243ed2f4e726d80143b094be0f55dbd3d52a26430041557576085ec72e512\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/upsolve/97yzI2eDoRqG7EuN/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Upsolve AI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#F13470\">\u003cmeta data-mint-head name=\"slack-app-id\" content=\"A0C9DAKJQ49\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.upsolve.ai/sql/functions/teradata\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/sql/functions/teradata.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.upsolve.ai/#organization\",\"name\":\"Upsolve AI\",\"url\":\"https://docs.upsolve.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/upsolve/2iK7L-lfLcwqCcz_/logo/light_logo.svg?fit=max\u0026auto=format\u0026n=2iK7L-lfLcwqCcz_\u0026q=85\u0026s=e2c715b3dad371be16e683c74655b2a8\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.upsolve.ai#website\",\"name\":\"Upsolve AI\",\"url\":\"https://docs.upsolve.ai\",\"publisher\":{\"@id\":\"https://docs.upsolve.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.upsolve.ai/sql/functions/teradata#webpage\",\"url\":\"https://docs.upsolve.ai/sql/functions/teradata\",\"name\":\"Teradata functions\",\"dateModified\":\"2026-11-16T21:24:38.093Z\",\"isPartOf\":{\"@id\":\"https://docs.upsolve.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.upsolve.ai/sql/functions/teradata#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.upsolve.ai/sql/functions/teradata#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Functions\",\"item\":\"https://docs.upsolve.ai/sql/functions/aggregate\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Teradata functions\",\"item\":\"https://docs.upsolve.ai/sql/functions/teradata\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.upsolve.ai/sql/functions/teradata#article\",\"headline\":\"Teradata functions\",\"name\":\"Teradata functions\",\"url\":\"https://docs.upsolve.ai/sql/functions/teradata\",\"mainEntityOfPage\":{\"@id\":\"https://docs.upsolve.ai/sql/functions/teradata#webpage\"},\"dateModified\":\"2026-11-16T21:24:38.093Z\",\"publisher\":{\"@id\":\"https://docs.upsolve.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.upsolve.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Upsolve AI\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Upsolve AI\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/sql/functions/teradata.md","siteName":"Upsolve AI","nav":{"global":{"anchors":[{"anchor":"Impact Studies","href":"https://upsolve.ai/impact-study?utm_source=docs\u0026utm_medium=sidebar\u0026utm_campaign=docs","icon":"newspaper"},{"anchor":"Security Trust Center","href":"https://trust.upsolve.ai/?utm_source=docs\u0026utm_medium=sidebar\u0026utm_campaign=docs","icon":"shield-halved"},{"anchor":"Community","href":"https://upsolve-ai-community.slack.com/join/shared_invite/zt-2x9oospxx-vv2uDP_20IafkekwCOMi4A#/shared-invite/email","icon":"slack"},{"anchor":"Blog","href":"https://upsolve.ai/blog?utm_source=docs\u0026utm_medium=sidebar\u0026utm_campaign=docs","icon":"newspaper"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"Analytics Layer","pages":[{"title":"Analytics Layer","href":"/embedded-bi/introduction"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations/introduction"}]},{"tab":"Chart Configurations","pages":[{"title":"Chart Configurations","href":"/content/charts/area-line-chart"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/v2/migrate-from-v1"}]},{"tab":"SQL Reference","groups":[{"group":"SQL","pages":[{"title":"Introduction","href":"/sql/introduction"}]},{"group":"Reference","pages":[{"title":"DESCRIBE","href":"/sql/reference/describe"},{"title":"EXECUTE","href":"/sql/reference/execute"},{"title":"PREPARE","href":"/sql/reference/prepare"},{"title":"SELECT","href":"/sql/reference/select"},{"title":"SHOW CATALOGS","href":"/sql/reference/show-catalogs"},{"title":"SHOW COLUMNS","href":"/sql/reference/show-columns"},{"title":"SHOW SCHEMAS","href":"/sql/reference/show-schemas"},{"title":"USE","href":"/sql/reference/use"},{"title":"VALUES","href":"/sql/reference/values"}]},{"group":"Data Types","pages":[{"title":"Data types","href":"/sql/reference/types"}]},{"group":"Functions","pages":[{"title":"Aggregate functions","href":"/sql/functions/aggregate"},{"title":"Array functions and operators","href":"/sql/functions/array"},{"title":"Binary functions and operators","href":"/sql/functions/binary"},{"title":"Bitwise functions","href":"/sql/functions/bitwise"},{"title":"Comparison functions and operators","href":"/sql/functions/comparison"},{"title":"Conditional Expressions","href":"/sql/functions/conditional"},{"title":null,"href":"/sql/functions/conversion"},{"title":"Date and time functions and operators","href":"/sql/functions/datetime"},{"title":"Decimal functions and operators","href":"/sql/functions/decimal"},{"title":"HyperLogLog Functions","href":"/sql/functions/hyperloglog"},{"title":"JSON functions and operators","href":"/sql/functions/json"},{"title":"Lambda expressions","href":"/sql/functions/lambda"},{"title":null,"href":"/sql/functions/map"},{"title":"Machine learning functions","href":"/sql/functions/ml"},{"title":"Quantile digest functions","href":"/sql/functions/qdigest"},{"title":null,"href":"/sql/functions/regexp"},{"title":"Set Digest functions","href":"/sql/functions/setdigest"},{"title":"String functions and operators","href":"/sql/functions/string"},{"title":"Table functions","description":null,"href":"/sql/functions/table"},{"title":"Teradata functions","href":"/sql/functions/teradata"},{"title":"URL functions","description":null,"href":"/sql/functions/url"},{"title":"UUID Functions","href":"/sql/functions/uuid"},{"title":"Window functions","href":"/sql/functions/window"}]},{"group":"Routines","pages":[{"title":"Introduction to SQL routines","href":"/sql/routines/introduction"},{"title":"Example SQL routines","href":"/sql/routines/examples"},{"title":"BEGIN","href":"/sql/routines/begin"},{"title":"CASE","href":"/sql/routines/case"},{"title":"DECLARE","href":"/sql/routines/declare"},{"title":"FUNCTION","href":"/sql/routines/function"},{"title":"IF","href":"/sql/routines/if"},{"title":"ITERATE","href":"/sql/routines/iterate"},{"title":"LEAVE","href":"/sql/routines/leave"},{"title":"LOOP","href":"/sql/routines/loop"},{"title":"REPEAT","href":"/sql/routines/repeat"},{"title":"RETURN","href":"/sql/routines/return"},{"title":"SET","href":"/sql/routines/set"},{"title":"WHILE","href":"/sql/routines/while"}]}]},{"tab":"Demo","pages":[{"title":"Demo","href":"/demo/product-walkthrough"}]}]},"basePath":"","title":"Teradata functions - Upsolve AI","deploymentId":"dpl_G6E2ur2Zjq51xGTVZPSFXsWoTxCu","buildId":"dpl_G6E2ur2Zjq51xGTVZPSFXsWoTxCu","dynamics":[],"chunks":[]}