copy date into text_item [message #87286] |
Thu, 16 December 2004 07:29 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
hudo
Messages: 165 Registered: May 2004
|
Senior Member |
|
|
I'd like to copy the date/contents of a text_item (typ: Date ,length 19, format mask: dd.mm.yyyy HH24:MI )
into another text_item ( typ: Date ,length 19, format mask: dd.mm.yyyy HH24:MI )
Used a WHEN-BUTTON-PRESSED Trigger with:
:MY_BLOCK.MY_NEW_TIMEFIELD := TO_DATE(:REF_BLOCK.REF_TIME,'dd.mm.yyyy HH24:MI' );
But the hours and minutes are always 00:00
I'd like to have the real hour and minute values in the :MY_BLOCK.MY_NEW_TIMEFIELD
|
|
|
Re: copy date into text_item [message #87290 is a reply to message #87286] |
Thu, 16 December 2004 11:08 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Just John
Messages: 69 Registered: November 2004
|
Member |
|
|
OK - here you go (again) (in joke)
You have two issues
1 - Are you saving the time element? By default Oracle will save any date as 00:00 unless specified (SYSDATE contains the time elements)
2 - the 'DATE' data type you define in the database differs from the 'DATE' data type in Forms. If you want forms to act in the same way I advise you use DATETIME.
Does this help?
Also: you should not need to TO_DATE a date when assigning it to another date. (if you do - you do!(?))
|
|
|
|