Click or drag to resize
CoreExtensionsToDateTime Method
Returns the DateTime representation of an object or default value if not.

Namespace: CMS.Base
Assembly: CMS.Base (in CMS.Base.dll) Version: 8.2.23
Syntax
C#
public static DateTime ToDateTime(
	this Object obj,
	DateTime defaultValue,
	string culture
)

Parameters

obj
Type: SystemObject
Object
defaultValue
Type: SystemDateTime
Default value
culture
Type: SystemString
Culture

Return Value

Type: DateTime

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Object. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also