date format problem

Database
Enthusiast

date format problem

Hi Team,

i have no date field in my data 

 

ex year month

    2017 05

    2017 06

 

i want to convert this one as date like 01/05/2017,01/06/2017 

 

Please help me to sort out this issue

1 REPLY
Senior Apprentice

Re: date format problem

What's the datatype of those columns?

INT: Cast((year-1900)*10000 + (month*100 + 1 AS DATE)

CHAR: Cast(year||month AS DATE Format 'yyyymm')