Date format in Procedure.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • oracle newbie
    New Member
    • Jun 2007
    • 31

    Date format in Procedure.

    create or replace
    PROCEDURE library_portal_ home
    (ldt portal_home_log in_log.logdatet ime%type
    CTY portal_home_log in_log.category %TYPE,
    brh portal_home_log in_log.branch%T YPE,
    usg portal_home_log in_log.user_gro up%TYPE,
    COT portal_home_log in_log.counter% TYPE)
    IS
    BEGIN
    INSERT
    INTO portal_home_log in_log
    VALUES(ldt, CTY, brh, usg, COT);
    DBMS_OUTPUT.PUT _LINE('ONE ROW IS ADDED......!');
    COMMIT;

    EXCEPTION
    WHEN dup_val_on_inde x THEN
    DBMS_OUTPUT.PUT _LINE('THIS IS A DUPLICATE VALUE......!');
    END library_portal_ home;


    How do I put a date format at the logdatetime? Becos I need to put a format by yearly, monthy and daily. something like DD-MON-YY HH
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    Please use the conversion function to achieve this.

    Comment

    • Saii
      Recognized Expert New Member
      • Apr 2007
      • 145

      #3
      you have to use to_char and to_date functions

      Comment

      Working...