DateTime..::.TryParse Method
This page is specific to:.NET Framework Version:
.NET Framework Class Library
DateTime..::.TryParse Method

Converts the specified string representation of a date and time to its DateTime equivalent and returns a value that indicates whether the conversion succeeded.

Overload List

  NameDescription
Public methodStatic memberTryParse(String, DateTime%)Converts the specified string representation of a date and time to its DateTime equivalent and returns a value that indicates whether the conversion succeeded.
Public methodStatic memberTryParse(String, IFormatProvider, DateTimeStyles, DateTime%)Converts the specified string representation of a date and time to its DateTime equivalent using the specified culture-specific format information and formatting style, and returns a value that indicates whether the conversion succeeded.
Top
See Also

Reference

Community Content

Fail = DateTime.MinValue
Added by:J.Moreno
From the 2.0 version:

Fail = DateTime.MinValue | Modified on 8/4/2008 5:09 AM by dirq


When this method returns, contains the System.DateTime value equivalent to the date and time contained in s, if the conversion succeeded, or System.DateTime.MinValue if the conversion failed. The conversion fails if the s parameter is null, or does not contain a valid string representation of a date and time. This parameter is passed uninitialized.
© 2010 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View