-3
-- else left(wof.ro_end_date, 4) + '-' + 
        substring(cast(wof.ro_end_date as varchar(20)), 5, 2) + '-' +
        right(wof.ro_end_date, 2)

This is the code that was originally used in SQL Server Management Studio. Is there any way to do this in the Impala data lake?

burnsa9
  • 131
  • 2
  • 3
  • 10

1 Answers1

3

Try this:

substr(cast(wof.ro_end_date as string),5,2) + '-' + strright(wof.ro_end_date, 2)
RobertMyles
  • 2,673
  • 3
  • 30
  • 45
Giri
  • 91
  • 2