Skip to main content
Question

We to build a KPI which identifies the required date format MM/DD/YYYY

  • November 16, 2021
  • 3 replies
  • 8 views

KPI

3 replies

  • Level 8
  • November 16, 2021

Hi @dubbaka.dines12 ,

 

I think converting the string 'Creation date' to a Date with the desired Format should work, If the string does not correspond to the format, will return null, then checking if the result is null or not with a Case/When statement dould works

 

CASE

WHEN ISNULL ( TO_DATE ( 'Creation date column' , FORMAT ( '%m/%d/%Y' ) ) = 1 THEN 'incorrect'

ELSE 'correct'

END

 

Hope it helps

Javier


  • November 16, 2021

Hi @dubbaka.dines12 ,

 

I think converting the string 'Creation date' to a Date with the desired Format should work, If the string does not correspond to the format, will return null, then checking if the result is null or not with a Case/When statement dould works

 

CASE

WHEN ISNULL ( TO_DATE ( 'Creation date column' , FORMAT ( '%m/%d/%Y' ) ) = 1 THEN 'incorrect'

ELSE 'correct'

END

 

Hope it helps

Javier

Hi Javier, Thanks for the help. It’s working Regards, Dinesh Email : dubbaka.dinesh@hcl.com Contact : 9000617170 [cid:image001.png@01D7BFCD.10B75450]

  • Level 8
  • November 16, 2021

Glad to help 👍