Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

concatenating date with time giving 0017 rather than 2017

user5716448May 21 2019 — edited May 24 2019

Hi,

version 11.2.0.3

we get supplied a table with 2 columns - one is date datatype and holds truncated date, other is varchar2(6) and holds time.

tried below but resulting field shows 10/04/0017 11:55:40 rather than 10/04/2017 11:55:40

to_date(a.date_created||' '||a.time_created,'DD/MM/YYYY HH24:MI:SS')

2017 is in date column.

why is this happening and how best can we combine these 2 columns into one DATE datatype column?

Thanks

This post has been answered by Frank Kulash on May 21 2019
Jump to Answer
Comments
Post Details
Added on May 21 2019
21 comments
870 views