15 pts.
 Need to save dates in Oracle Forms 10g without modifying data values
I am trying to save date and time as entered by the users example: In the insert and update triggers of my block my statement is: :MAIN_BLOCK.USER_DATE := TO_DATE(TO_CHAR(:MAIN_BLOCK.USER_DATE,'DD-MON-YYYY')||' '||:MAIN_BLOCK.HOUR||':'||:MAIN_BLOCK.MIN||':00 '||:MAIN_BLOCK.MERIDIAN,'DD-MON-YYYY HH:MI:SS AM').  I am trying to save :MAIN_BLOCK.USER_DATE as "25-MAY-2010 11:00:00 AM" as the user entered in the form textboxes and is saving "25-MAY-2010 12:00:00 AM". Why do it changes the time value? Thanks!



Software/Hardware used:
ORACLE 10G FORMS AND ORACLE 11G DATABASE
ASKED: July 15, 2010  3:12 PM
UPDATED: July 15, 2010  5:03 PM

Answer Wiki:
Make sure your :MAIN_BLOCK.USER_DATE item's data type is DATETIME and not DATE. DATE items don't store a time component.
Last Wiki Answer Submitted:  July 15, 2010  4:55 pm  by  carlosdl   63,580 pts.
All Answer Wiki Contributors:  carlosdl   63,580 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Yes, I realized it and changed the Date data type to Datetime! Thanks a lot for your time and answer! Blessings!

 15 pts.