AdvantageCMS.Core.Common.BaseClasses Namespace
Build With Advantage

StringExtensions..::..ToDateTime Method

Parses the string as a DateTime, returning null if the string is empty or invalid.

Namespace:  AdvantageCMS.Core.Common
Assembly:  AdvantageCMS.Core (in AdvantageCMS.Core.dll)

Syntax


public static Nullable<DateTime> ToDateTime(
	this string s
)

Parameters

s
Type: String
The string to parse.

Return Value

The parsed DateTime, or null if parsing fails.