Click or drag to resize

NullableDateHelperFormatDate Method

Formats a nullable date based on the specified format.

Namespace:  Xcalibur.Helpers
Assembly:  Xcalibur.Helpers (in Xcalibur.Helpers.dll) Version: 1.0.1.0 (1.0.1.0)
Syntax
public static string FormatDate(
	this Nullable<DateTime> date,
	string format,
	bool convertToUtc = false
)

Parameters

date
Type: SystemNullableDateTime
The date.
format
Type: SystemString
The format.
convertToUtc (Optional)
Type: SystemBoolean
if set to true [convert to UTC].

Return Value

Type: String

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type NullableDateTime. 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