Skip to Content
0
Jul 11, 2019 at 12:35 PM

Convert date to datetime

843 Views Last edit Jul 15, 2019 at 06:26 AM 3 rev

Hi All,

In my source I have 2 different date formats with datetype varchar(30)

1.DD/MM/YYYY

2.MM/DD/YYYY HH:MM:SS AM

My target should be in the form of 2.MM/DD/YYYY HH:MM:SS AM as Datetime

Now, how can I select only 1.DD/MM/YYYY format and change it to 2.MM/DD/YYYY HH:MM:SS AM format.

I have tried to_char, to_date. However I am getting null values for this 2.MM/DD/YYYY HH:MM:SS format.

Anyone could help me on this?

Appreciate for quick help.

Thanks,

Surya