[WEIRD] Merge date and char

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mau Pastor

    [WEIRD] Merge date and char

    I am creating a view on a table that has the date information split in
    two columns: a DATE column and a char column. The char column holds
    the HH24:MI information. Please don't ask me why this is like this,
    it's a very old database converted from a different DBMS.

    I need to get this information into a single DATE column. Ny best shot
    so far was to try get the total number of minutes with substr and add
    them to the date, but I could not get it right.

    Can anyone show me an example?
  • Jim Kennedy

    #2
    Re: [WEIRD] Merge date and char

    theDate+(hh24/24)+(mi/(24*60))
    Should do it.
    Jim

    --
    Replace part of the email address: kennedy-down_with_spamm ers@attbi.com
    with family. Remove the negative part, keep the minus sign. You can figure
    it out.
    "Mau Pastor" <maupastor@hotm ail.comwrote in message
    news:6575a8ed.0 310040028.5e1d9 523@posting.goo gle.com...
    I am creating a view on a table that has the date information split in
    two columns: a DATE column and a char column. The char column holds
    the HH24:MI information. Please don't ask me why this is like this,
    it's a very old database converted from a different DBMS.
    >
    I need to get this information into a single DATE column. Ny best shot
    so far was to try get the total number of minutes with substr and add
    them to the date, but I could not get it right.
    >
    Can anyone show me an example?

    Comment

    Working...