Ask a Question related to ASP.NET General, Design and Development.
-
S. Justin Gengo #1
Re: Cast from String To Date
Are you validating the entry before the cast occurs?
My guess would be that someone is entering a string that couldn't possible
be a date.
Try using a compare validator on the date entry field:
Set the validator's "Operator" parameter to "DataTypeCheck" and its "Type"
to "Date".
(This will validate the text box client side. To make sure a browser that
doesn't support client side validation doesn't still submit a non-date also
check Page.IsValid before submitting to database.)
I hope this helps,
--
S. Justin Gengo, MCP
Web Developer / Programmer
Free Code Library At:
[url]www.aboutfortunate.com[/url]
"Out of chaos comes order."
Nietzche
"Vrushal" <vsvartak@yahoo.com> wrote in message
news:007501c34bb9$4768f680$a401280a@phx.gbl...> Hi Guys..
>
> I m getting error "Cast From String to Date Not Valid"
>
> We have around 100 ASP.Net Pages and error comes on some
> pages and works fine with other pages While Inserting
> Data, Update Data...
>
> For updation and Insertion i have written procedures, and
> all the field Type is have DateTime.
>
> what could be possible cause...
>
> Thnkx in Advance...
> vrushal
>
>
S. Justin Gengo Guest
-
#38785 [Opn]: float to string cast is always subject to locale settings
ID: 38785 User updated by: m dot kurzyna at crystalpoint dot pl -Summary: stripslashes is setlocale aware - decimal point... -
Why can I pass a string, but not a date?
I have this custom component that at the moment just repeats the passed in value. It works if I pass in a string, but if I pass the date I... -
extract a date from a string
I'm trying to figure out a way to extract dates from a string of any length using strtotime. strtotime only works if the date is formatted to GNU... -
Help on processinf Date String.
Pandey Rajeev-A19514 wrote at Wed, 10 Sep 2003 11:56:01 +0530: Here's a complete example working with Date::Manip. use Date::Manip; my... -
String to Date
rob, with vb you can get a string in the format "DD/MM/YYYY HH:MM:SS" or month first, depending on your windows locale, to a Date object by...



Reply With Quote

