Click or drag to resize

DateTimeExtensionsSetDate Method

Create a new date/time object replacing the date component with the specified date value. See also RemoveDate(DateTime).

Namespace:  NetQuarry
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
public static DateTime SetDate(
	this DateTime dt,
	DateTime date
)

Parameters

dt
Type: SystemDateTime
The date/time in question.
date
Type: SystemDateTime
The date to set. The time component, if any, is ignored.

Return Value

Type: DateTime
The provided date/time with its date component set to the specified date.

Usage Note

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