Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date validation oops!

Status
Not open for further replies.

saustin

MIS
Feb 19, 2001
336
0
0
US
Have a user who entered '8/1007' into a text field that when converted to a date resulted in the year 2007. Not good ! Any other date validation tricks out there that might be preferable ?

Thanks.

SQL> select TO_CHAR(TO_DATE('8/1007', 'MM-DD-RRRR') ,'YYYY') from dual;

TO_C
----
2007

SQL>
 
SAustin said:
Any other date validation tricks out there that might be preferable ?
Steve, what are you asking for us to suggest here?...Preferable to what? The very first "trick" that I would ALWAYS recommend in the Oracle World is: Never use/allow anything but a DATE column type to store DATE data.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[ Providing low-cost remote Database Admin services]
Click here to join Utah Oracle Users Group on Tek-Tips if you use Oracle in Utah USA.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top