G
Guest
Hi,
I have a web application that when run on my local host generates the error:
Exception Details: System.InvalidCastException: Cast from string "06/17/2004" to type 'Date' is not valid.
This is the line that generates the error:
dtbOpenDate.xDate = Now.ToString("MM/dd/yyyy")
The app runs successfully on many other machines including a server which hosts it, therefore the problem is specific to my computer. If I change the format to "dd/MM/yyyy" and recompile the dll my computer, it runs it successfully. Is there a setting somewhere that would influence this (I have changed the short date format within regional settings but it makes no difference).
Thanks for any help you may have,
I have a web application that when run on my local host generates the error:
Exception Details: System.InvalidCastException: Cast from string "06/17/2004" to type 'Date' is not valid.
This is the line that generates the error:
dtbOpenDate.xDate = Now.ToString("MM/dd/yyyy")
The app runs successfully on many other machines including a server which hosts it, therefore the problem is specific to my computer. If I change the format to "dd/MM/yyyy" and recompile the dll my computer, it runs it successfully. Is there a setting somewhere that would influence this (I have changed the short date format within regional settings but it makes no difference).
Thanks for any help you may have,