Home » Developer & Programmer » Forms » verification of a date (oracle forms 10g ,win xp pack 2)
verification of a date [message #580027] Tue, 19 March 2013 08:35 Go to next message
goldray
Messages: 104
Registered: December 2012
Senior Member
I have 3 types list items:
1) :1 Day -> 31
2) Month: 1 -> 12
3) Year :1990 -> 2013

I want to check that the user has selected a valid date .. if not an error message will be displayed, for example:
31-02-2013: will be rejected

Any suggestions?
Re: verification of a date [message #580030 is a reply to message #580027] Tue, 19 March 2013 08:50 Go to previous messageGo to next message
Michel Cadot
Messages: 58847
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Try to convert the given data to a date, if it is a wrong one Oracle will send an error:
TO_DATE(<your data>,'DD-MM-YYYY')

Regards
Michel
Re: verification of a date [message #580031 is a reply to message #580030] Tue, 19 March 2013 08:57 Go to previous messageGo to next message
cookiemonster
Messages: 10903
Registered: September 2008
Location: Rainy Manchester
Senior Member
Use a proper calender instead.
Re: verification of a date [message #580033 is a reply to message #580027] Tue, 19 March 2013 09:08 Go to previous messageGo to next message
goldray
Messages: 104
Registered: December 2012
Senior Member
I do the test in when-validate-record trigger?
Re: verification of a date [message #580039 is a reply to message #580033] Tue, 19 March 2013 11:59 Go to previous messageGo to next message
cookiemonster
Messages: 10903
Registered: September 2008
Location: Rainy Manchester
Senior Member
yes, but really, use a proper calender, your users will much prefer it.
Re: verification of a date [message #580055 is a reply to message #580039] Tue, 19 March 2013 13:27 Go to previous messageGo to next message
goldray
Messages: 104
Registered: December 2012
Senior Member
Ok Sir ,i will use calender
Re: verification of a date [message #580058 is a reply to message #580055] Tue, 19 March 2013 14:26 Go to previous messageGo to next message
goldray
Messages: 104
Registered: December 2012
Senior Member
I am creating the calendar
I met a problem at creation 5th item (javabean):
I encountered this error:
frm-13008 cannot find javabean with name
oracle.forms.fd.JCalendar not found

[Updated on: Tue, 19 March 2013 14:27]

Report message to a moderator

Re: verification of a date [message #580065 is a reply to message #580058] Tue, 19 March 2013 15:22 Go to previous messageGo to next message
mughals_king
Messages: 351
Registered: January 2012
Location: pakistan
Senior Member

easy way use Craig's Technique to make calendar.



https://sites.google.com/site/craigsoraclestuff/oracle-forms---how-to-s/forms-how-to-use-a-calendar-in-a-form





Mughal Smile
Re: verification of a date [message #580069 is a reply to message #580065] Tue, 19 March 2013 18:14 Go to previous messageGo to next message
cookiemonster
Messages: 10903
Registered: September 2008
Location: Rainy Manchester
Senior Member
You realize that's the same link I posted above?
Re: verification of a date [message #580072 is a reply to message #580069] Tue, 19 March 2013 19:24 Go to previous message
goldray
Messages: 104
Registered: December 2012
Senior Member
yes ,the date forms it work but the date java not !!
any solutions ?
Previous Topic: Insert DATA in my DB on uppercase format
Next Topic: RTF changes not shown for specific language
Goto Forum:
  


Current Time: Wed Aug 20 17:57:21 CDT 2014

Total time taken to generate the page: 0.11676 seconds