problems with to_date in Oracle PL/SQL

Last post 05-07-2008 2:02 PM by yeotumitsu@sify.com. 1 replies.

Sort Posts:

  • problems with to_date in Oracle PL/SQL

    05-07-2008, 11:24 AM
    • Loading...
    • ibra73
    • Joined on 11-26-2007, 9:43 PM
    • Posts 75

    SELECT to_date((to_date('03/17/2008 06:30 AM', 'MM/DD/YYYY HH:MI AM') + 1800 / 86400), 'MM/DD/YYYY HH:MI AM') from dual

    When I run this i get oracle error 1843 not a valid month, but the syntax seems fine. This is in Oracle 10g.  Anyone have a suggestions?

  • Re: problems with to_date in Oracle PL/SQL

    05-07-2008, 2:02 PM
    Answer

    select to_date('03/17/2008 06:30 AM','MM/DD/YYYY HH:MI AM') + (1800/86400) from dual; 

    if this not helps can you be more presize what the result you want. 

    Hope it helps.

    -Manas

    =======================================
    If this post is useful to you, please mark it as answer.
Page 1 of 1 (2 items)
Microsoft Communities
Page view counter