c# - String was not recognized as a valid DateTime from DateTimePicker -
I get his error at hnddate
(hidden field value is coming from time picker at time ): >
date time start date
string not recognized as a valid date time Was there. = GetFirstDayOfWeek (convert toDateTime (hdndate.Value)). Addition (0); DateTime WeekDate = WeekStartDate Admission (14);
The query is in dated 2014/04/28 and the date picture (hnddate) is in the format 28/04/2014, which starts by comparing a column in the database.
Assume that hdndate.value
is actually a string and its value Change it to:
Convert toDateTime (hdndate.Value)
With this:
DateTime.SpeaceExact (HDNDT value, "DD / MM / YYY", Culture Info. InverterTech);
< Hr> Allows you to specify the exact format of your input string, so that it can properly correct DateTime
could arise in this case, your format is dd / MM / yyyy
.
Comments
Post a Comment