Home » Developer & Programmer » Forms » time problem
time problem [message #258598] Mon, 13 August 2007 02:52 Go to next message
hussienburhan
Messages: 28
Registered: July 2007
Junior Member
HI
I MADE ONE FORM AND I PUT TEXT ITEM ITS DATA TYPE IS TIME

WHEN I INSERT VALUE TO THIS TEXT ITEM FOR EXMAPLE 12:12 AND I ASSIGIN ITS VALUE TO VARIABLE I DEFINE IT WILL GIVE THE NUMBER OF SECONDS IN THIS TIME NOT THE SAME TIME 12:12



HOW I CAN KEEEP THE TIME SAME I DO NOT WANA HAVE SECONDS OF THIS TIME I JUST WANT SAME TIME I INSERT AS USER
Re: time problem [message #258608 is a reply to message #258598] Mon, 13 August 2007 03:20 Go to previous messageGo to next message
Littlefoot
Messages: 20888
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Truncate value to minutes; see an example
SQL> select sysdate full_time,
  2         trunc(sysdate, 'mi') only_ninutes
  3  from dual;

FULL_TIME           ONLY_NINUTES
------------------- -------------------
13.08.2007 10:11:58 13.08.2007 10:11:00

SQL>

Note that DATE columns contain both DATE and TIME component - you can not remove neither of them.

In order to show only time, you'll have to use appropriate format mask in front-end (form you use).

P.S. I forgot to mention ... I'd suggest you NOT to change data type from DATE to CHAR in order to be able to store exactly "10:11", without date (13.08.2007); DATE data type is here to store date (time) values.

P.P.S. Please, don't use all capitals when posting a message.

[Updated on: Mon, 13 August 2007 03:22]

Report message to a moderator

Re: time problem [message #258701 is a reply to message #258598] Mon, 13 August 2007 07:19 Go to previous messageGo to next message
azamkhan
Messages: 548
Registered: August 2005
Senior Member
Use format mask
Re: time problem [message #258708 is a reply to message #258701] Mon, 13 August 2007 07:40 Go to previous messageGo to next message
Littlefoot
Messages: 20888
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Azamkhan, read previous posts; your answer didn't bring anything new to the problem or its solution.
Re: time problem [message #258710 is a reply to message #258708] Mon, 13 August 2007 07:44 Go to previous messageGo to next message
azamkhan
Messages: 548
Registered: August 2005
Senior Member
No Message Body
Re: time problem [message #258711 is a reply to message #258708] Mon, 13 August 2007 07:45 Go to previous message
azamkhan
Messages: 548
Registered: August 2005
Senior Member
SELECT sysdate full_time, TO_CHAR(sysdate, 'MI') only_ninutes
from dual;
Previous Topic: date validation problem
Next Topic: how can i restrict enter alphabet in number field at the time of key pressing
Goto Forum:
  


Current Time: Sat Dec 03 01:27:02 CST 2016

Total time taken to generate the page: 0.07459 seconds