Upravit

Sdílet prostřednictvím


DateOnly.FromDateTime(DateTime) Method

Definition

Returns a DateOnly instance that is set to the date part of the specified dateTime.

public:
 static DateOnly FromDateTime(DateTime dateTime);
public static DateOnly FromDateTime (DateTime dateTime);
static member FromDateTime : DateTime -> DateOnly
Public Shared Function FromDateTime (dateTime As DateTime) As DateOnly

Parameters

dateTime
DateTime

The DateTime instance.

Returns

The DateOnly instance composed of the date part of the specified input time dateTime instance.

Applies to