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!

Combine 2 Columns into a Date Field

Rever75Apr 10 2019 — edited Apr 10 2019

OK,

  SO I am having an issue trying to take 2 Columns (Number 6,0) and convert them to a Single Date Column. I was able to successfully take one column and convert it to_date(Date1, 'yyyymmdd') but the  time one is more problematic. The biggest issue is whomever designed this Table gaffed and is storing the time 24HR in a number field so Midnight is 0 and 1PM is 130000 and 2:32:42 is 143242 which cause me to do LPAD(TIME1,6,0) to get the full length. However I believe this is causing an issue in converting it to a Proper time to concat with the Date. Any help would be greatly appreciated. 

This post has been answered by mathguy on Apr 10 2019
Jump to Answer
Comments
Post Details
Added on Apr 10 2019
10 comments
908 views