469,641 Members | 1,134 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,641 developers. It's quick & easy.

Date Validation Problems

I am having some validation and insertion problems. I am using a date
picker that takes the selected date and puts it to ("dd-MMM-yyyy") format,
as this was the only format that Oracle would accept on an insert, however,
when it does a comparision validation it is failing. I have

StartDate = comparing to an invisible textbox that contains todays date
EndDate = comparing to StartDate needing to be >=
SetupDate = comparing to StartDate needing to be <=

So how it looks is like this

26-MAY-2004 = text box with Today's date
24-JUN-2004 = StartDate
24-JUN-2004 = EndDate
24-JUN-2004 = SetupDate

This example fails on validation stating that StartDate must be greater than
today's date. I know the problem has to do with the conversion to a string
format where JUN would be less than MAY thus making it invalid. When I use
the ToShortDateString option the validation works but the insert into the
database fails because the format is which oracle is not accepting.

I have tried taking the ToShortDateString and formatting that into another
variable, but it says it can't take a string variable and convert it into
the appropriate dd-MMM-yyyy format. Any ideas on how to get this to compare
for validation correctly and get it to insert into the database?
Nov 16 '05 #1
0 1805

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

30 posts views Thread by Dr John Stockton | last post: by
6 posts views Thread by Jim Davis | last post: by
7 posts views Thread by Paul | last post: by
12 posts views Thread by Diego | last post: by
4 posts views Thread by Dr J R Stockton | last post: by
3 posts views Thread by =?Utf-8?B?Q2hyaXM=?= | last post: by
2 posts views Thread by John Smith | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.