insert time only

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jestin
    New Member
    • Mar 2008
    • 12

    insert time only

    hi friends,

    I have a problem with time oracle 8i,can anybody tell me how to insert time in oracle 8i db(for example i want to insert a time like 4:45:00 PM) if u have any solution please give me the code.

    thx
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    u want to insert both date and time or only time ?

    Comment

    • jestin
      New Member
      • Mar 2008
      • 12

      #3
      Originally posted by debasisdas
      u want to insert both date and time or only time ?
      i want insert time only can u help me

      Comment

      • jestin
        New Member
        • Mar 2008
        • 12

        #4
        insert time only

        hi

        i am using oracle 8i as my db, i am getting one problem while i saving time can anybody helps me in this situation.

        the asp code is as follows.

        [HTML]sqlinsert="INSE RT INTO ACPADMIN.Tbl_Re questSched (" &_
        "Rschedid, " &_
        "RschedReqi d, " &_
        "RschedTime)val ues(" &_
        ReplaceQuote(au tonor) & ", " &_
        ReplaceQuote(FK ID) & ", " &_
        "to_date(" & STR_Quote2(Repl aceQuote(schedS Time)) & ", 'HH24:MI:SS'))"
        [/HTML]

        and the schedSTime is like 16:15(24 hr format),and schedSTime is saved in the table is like as 4/1/2008 4:15:00 PM, what i want from u is that, i want to save only the time like this 4:15:00 PM without date. do u have any idea,

        thx

        Comment

        • debasisdas
          Recognized Expert Expert
          • Dec 2006
          • 8119

          #5
          Convert the date to this format 'DD-MM-YY HH24:MI:SS' and then insert.

          Comment

          Working...