Tech Diary

July 25, 2019

Teradata SQL Regular Expression to compare date format

Verify if date is in format dd-MMM-yyyy

select
 regexp_similar(a_date,'^(([0-9])|([0-2][0-9])|([3][0-1]))\-(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)\-\d{4}$') = 1
from table1
Posted by DV at July 25, 2019 No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: SQL, Tech
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Total Pageviews

Search This Blog

Labels

  • AWS
  • Bitbucket
  • Data Science
  • Finance
  • Git
  • Graph data
  • ionic
  • Java
  • JBoss
  • Linux
  • MySQL
  • R
  • Recursive
  • Regular Expression
  • S3
  • Scheduling
  • SQL
  • Tech
  • Technical Analysis
  • Teradata
  • Unix
  • Web

About Me

DV
View my complete profile

Blog Archive

  • ►  2022 (1)
    • ►  March (1)
  • ►  2021 (1)
    • ►  February (1)
  • ►  2020 (2)
    • ►  March (1)
    • ►  February (1)
  • ▼  2019 (29)
    • ►  August (1)
    • ▼  July (1)
      • Teradata SQL Regular Expression to compare date fo...
    • ►  June (1)
    • ►  April (5)
    • ►  March (20)
    • ►  January (1)
  • ►  2018 (84)
    • ►  December (56)
    • ►  November (27)
    • ►  June (1)
  • ►  2017 (18)
    • ►  November (1)
    • ►  September (1)
    • ►  August (1)
    • ►  July (3)
    • ►  May (1)
    • ►  February (9)
    • ►  January (2)
  • ►  2016 (15)
    • ►  October (2)
    • ►  September (4)
    • ►  July (6)
    • ►  June (2)
    • ►  May (1)
  • ►  2015 (3)
    • ►  July (2)
    • ►  June (1)
  • ►  2014 (20)
    • ►  September (3)
    • ►  August (8)
    • ►  July (5)
    • ►  May (3)
    • ►  April (1)

Popular Posts

Simple theme. Powered by Blogger.