time problem [message #258598] |
Mon, 13 August 2007 02:52 |
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 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Truncate value to minutes; see an exampleSQL> 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
|
|
|
|
|
|
|