Click or drag to resize
DateTimeToUniversalTime Method
Converts the value of the current DateTime object to Coordinated Universal Time (UTC).

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public DateTime ToUniversalTime()

Return Value

Type: DateTime
An object whose Kind property is Utc, and whose value is the UTC equivalent to the value of the current DateTime object, or MaxValue if the converted value is too large to be represented by a DateTime object, or MinValue if the converted value is too small to be represented by a DateTime object.
See Also