Databases

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • AW: Caluculation with date

    1 answers - 928 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Any date calculation is in days. I.e. you have to multiply your result by 24 and then by 60 to get the result in minutes.
    SQLselect (to_date('27.06.2006 13:22:12', 'dd.mm.yyyy hh24:mi:ss')
    2 - to_date('25.06.2006 12:48:50', 'dd.mm.yyyy hh24:mi:ss')) * 24 * 60 diff_in_minutes
    3 from dual;
    DIFF_IN_MINUTES
    2913.36667
    Clemens
    Hi,
    How can I calculate the difference between two date / time
    values like this:
    27.06.2006 13:22:12, 'dd.mm.yyyy hh24:mi:ss' - 25.06.2006
    12:48:50,
    'dd.mm.yyyy hh24:mi:ss' = result in minutes.
    Thank you for answering
    Mit freundlichen G / Yours sincerly
    Guido Wendlandt
    G GmbH
    Neue H 1
    49124 G
    Tel.: +49-(0)5401-394723
    FAX: +49-(0)5401-394598
    Mobil: +49-(0)170-7857345
    <http://www.gmh.dehttp://www.gmh.de
  • No.1 | | 2073 bytes | |

    You can use an sql trigger for making it easier next time But i dont
    know what kinda trigger you should use to convert date values in the data.
    I think date data on oracle DB can be edited easily. I am doing so
    PostgreSQL. And, the date jnowledge is giving auto date.
    king regards,

    ,''`. Karatas
    : :' : ozgur (AT) ozgurkaratas (DOT) com
    `. `' http://www.ozgurkaratas.com
    `- Powered By Debian GNU\Linux

    Any date calculation is in days. I.e. you have to multiply your result by
    24 and then by 60 to get the result in minutes.

    SQLselect (to_date('27.06.2006 13:22:12', 'dd.mm.yyyy hh24:mi:ss')
    2 - to_date('25.06.2006 12:48:50', 'dd.mm.yyyy hh24:mi:ss'))
    * 24 * 60 diff_in_minutes
    3 from dual;

    DIFF_IN_MINUTES

    2913.36667
    --
    Clemens


    >Hi,
    >>

    >How can I calculate the difference between two date / time
    >values like this:
    >>

    >27.06.2006 13:22:12, 'dd.mm.yyyy hh24:mi:ss' - 25.06.2006
    >12:48:50,
    >'dd.mm.yyyy hh24:mi:ss' = result in minutes.
    >>
    >>
    >>

    >Thank you for answering
    >>
    >>
    >>

    >Mit freundlichen G / Yours sincerly
    >>
    >>
    >>

    >Guido Wendlandt
    >>
    >>
    >>
    >>
    >>

    >
    >>

    >G GmbH
    >>

    >Neue H 1
    >>

    >49124 G
    >>

    >Tel.: +49-(0)5401-394723
    >>

    >FAX: +49-(0)5401-394598
    >>

    >Mobil: +49-(0)170-7857345
    >>

    ><http://www.gmh.dehttp://www.gmh.de

Re: AW: Caluculation with date


max 4000 letters.
Your nickname that display:
In order to stop the spam: 8 + 7 =
QUESTION ON "Databases"

EMSDN.COM