Expand Minimize
4 out of 22 rated this helpful - Rate this topic

Troubleshooting Exceptions: System.FormatException 

A FormatException exception is thrown when the format of an argument does not meet the parameter specifications of the invoked members. For example, if a method specifies a string parameter consisting of two digits with an embedded period, passing a string argument containing only two digits to that method would cause a FormatException exception to be thrown.

Make sure your method arguments are in the right format.

The format of your method arguments must meet the parameter specifications of the invoked members.

When converting a string to DateTime, parse the string to take the date before putting each variable in the DateTime object.

For example, DateTime.Minute = 30. For more information, see DateTime.

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.