Home » Developer & Programmer » Forms » copy date into text_item
copy date into text_item [message #87286] Thu, 16 December 2004 07:29 Go to next message
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 messageGo to next message
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!(?))
Re: copy date into text_item [message #87296 is a reply to message #87290] Thu, 16 December 2004 12:18 Go to previous message
hudo
Messages: 165
Registered: May 2004
Senior Member
ok, with choosing in FORMS data type DATETIME , is everything ok.
Thanks for your hint
Previous Topic: please check this and reply me. need the help on forms and reports.
Next Topic: help me i want to fetch data from web in my db
Goto Forum:
  


Current Time: Sun Sep 08 03:50:37 CDT 2024