This document is provided on an "AS IS" basis without warranties of any kind. Smartsite iXperion class libraries may change in future releases.
Sets the date components of the given DateTime.

Namespace: Smartsite.Runtime.Modules
Assembly:  Smartsite.Runtime.Modules (in Smartsite.Runtime.Modules.dll)

Syntax

C#Copy imageCopy Code
[(IsDeterministic = true)]
public static <> SetDate(
	 dt,
	int year,
	int month,
	int day
)
Visual Basic (Declaration)Copy imageCopy Code
<(IsDeterministic := True)> _
Public Shared Function SetDate ( _
	dt As , _
	year As Integer, _
	month As Integer, _
	day As Integer _
) As (Of )

Parameters

dt
DateTime
A DateTime.
year
Int32
The year (1 through 9999).
month
Int32
The month (1 through 12).
day
Int32
The day (1 through the number of days in the given month).

Return Value

A new DateTime with the same time as the given DateTime, and the date set to the given date component values.

Examples

2007-05-01T09:21:59 Result: 2007-05-01T09:21:59

See Also

Advanced