0
votes

I am using oracle forms builder 10g and i am trying to save a time that has to be input by the user into the database. my input field's data type is TIME and my column in the database is of type VARCHAR2(20). When the system's time is 07:43:00 and i try to save a time like 08:00:00, I get 28800 saved in my database.

1
8 hours = 28800 seconds - APC
i want to save the time just like what the user has input - Pohur

1 Answers

0
votes

You could convert the time to the format desired explicitly using to_char(time field,"HH:MI:SS")

  • Make the user entered time field non base table
  • Include database varchar2(20) column in the block but do not display it
  • Set the varchar2 column using the format mask

If you have a single record block, use the pre-commit trigger If you have a multi record block, use the post-record trigger

varchar2 column := to_char(time field,"HH:MI:SS");