Editar

Partilhar via


TimeOnly.FromDateTime(DateTime) Method

Definition

Constructs a TimeOnly object from a DateTime representing the time of the day in this DateTime object.

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

Parameters

dateTime
DateTime

The DateTime object to extract the time of the day from.

Returns

A TimeOnly object representing time of the day specified in the DateTime object.

Applies to