Quantcast
Channel: String was not recognized as a valid DateTime.
Browsing latest articles
Browse All 13 View Live

Re: String was not recognized as a valid DateTime.

Thanks lokesh, that is working perfect. But the query is giving me error asprivate void SetMailInfo() { DataTable dtEmpDetails = new DataTable(); dtEmpDetails = cmf.ReturnDataTable(" Select...

View Article



Re: String was not recognized as a valid DateTime.

if (hr_ext_by.Length == 0) { StrPubBody1 = "Dear " + RA1.ToString().ToUpper() + ", "; StrPubBody1 = StrPubBody1 + " <br/><br/> <b>" + empName.ToString().ToUpper() + " (" + empCardNo +...

View Article

Re: String was not recognized as a valid DateTime.

Hi deven,tried your way, getting error asOperator '==' cannot be applied to operands of type 'string' and 'bool'.UPDATE:I changed it like this "false" and it resolved my error.But now the issue...

View Article

Re: String was not recognized as a valid DateTime.

if (hr_ext_by.Length == 0) { StrPubBody1 = "Dear " + RA1.ToString().ToUpper() + ", "; StrPubBody1 = StrPubBody1 + " <br/><br/> <b>" + empName.ToString().ToUpper() + " (" + empCardNo +...

View Article

Re: String was not recognized as a valid DateTime.

can you add that in first line of my code and give me. please as it is giving me error

View Article


Re: String was not recognized as a valid DateTime.

!string.IsNullOrEmpty(confirmationDate) ? Convert.ToDateTime(confirmationDate).ToString("dd,MMM yyyy") : ""

View Article

Re: String was not recognized as a valid DateTime.

Nadeem157 Value is "" and datatype is String. That can't be converted to a DateTime. You should test to see if the string IsNullOrEmpty before attempting to convert it to a datetime

View Article

Re: String was not recognized as a valid DateTime.

Its giving you the error on conversion because the value in confirmationDate is a empty string.

View Article


Re: String was not recognized as a valid DateTime.

Mikesdotnetting What's the value of confirmationDate? What is its datatype? Value is "" and datatype is String.Mikesdotnetting Why are using Convert.ToDateTime on a DateTime?It was already coded, so...

View Article


Re: String was not recognized as a valid DateTime.

Hi,It would be rather because of Convert.ToDateTime(confirmationDate). Which string value do you have inconfirmationDate? It's likely best to convert to an actual value as soon as you can (you have...

View Article

Re: String was not recognized as a valid DateTime.

Nadeem157 Convert.ToDateTime(confirmationDate).ToString("dd,MMM yyyy")What's the value of confirmationDate? What is its datatype? Nadeem157 Convert.ToDateTime(DateTime.Now) Why are using...

View Article

Re: String was not recognized as a valid DateTime.

Looks like your confirmationDate is not a valid datetime string.

View Article

String was not recognized as a valid DateTime.

In my mail function when I try to debug, I get StrPubBody1 as null, so it is giving me error asString was not recognized as a valid DateTime.Here is my code:-if (hr_ext_by.Length == 0) { StrPubBody1 =...

View Article

Browsing latest articles
Browse All 13 View Live




Latest Images