Hi everyone ,
I got Error Failed to convert parameter value from a String to a DateTime.
In Below Scenario I got this error.
when I am doing Unit testing on my Local Machine then it is working fine.
there is no error like this on my local machine OS is windows7, but when I deploy code on Server then I got this Error , on server there is windows8 ,
IS there some culture issue due to which throw this ERROR.
Below possibilities I have checked that due to this error may be occurred :
I have check Server system datetime and my machine datetime , it is same,
changed date format like MM/DD/YYYY.
Below Code I m using :
SqlParameter[] parms1 = {
new SqlParameter("@VisitDate", SqlDbType.Date)
};
parms1[0].Value = DateTime.Now.Date;
but error is occurring on Server.
suggest me what I do for resolving this issue..
Thanks in advanced.
~MP