Solved

Java regex date formats and how to write dq rules for date patterns yyyy-mm-dd hh:mi:ss.ms

  • 13 February 2024
  • 1 reply
  • 40 views

Badge

Hi folks, I have a date format that I need to validate using a DG rule in Ataccama ONE. I don’t need to do anything with it, just validate that the format is as expected. Any ideas on how I can achieve this please?

Many thanks

DC

 

icon

Best answer by Samuel Muvdi 13 February 2024, 20:39

View original

1 reply

Userlevel 1
Badge +3

Hello @Delbert71!

I recommend trying to do something like this with an advanced expression. It will turn your date to a string and see if its able to in that format, and if it doesn't return null, then its correct, it is of that type:

toString(date, 'yyyy-MM-dd hh:mm:ss') is not null

Reply