Show / Hide Table of Contents

Method FromDateTime

FromDateTime(DateTime)

Converts System.DateTime to DateOnly. Only year, month, and day are used and any time-related information is lost in the conversion.

Declaration
public static DateOnly FromDateTime(DateTime dateTime)
Parameters
Type Name Description
System.DateTime dateTime
Returns
Type Description
DateOnly

Applies to

Platforms and versions
TargetVersions
.NET Framework200.4 - 200.8
UWP200.4 - 200.8
In This Article
Back to top Copyright © 2022 Esri.