'Declaration Public Function ToUniversalTime( _ ByVal dateTime As System.Date _ ) As System.Date
public System.DateTime ToUniversalTime( System.DateTime dateTime )
Parameters
- dateTime
- The local time to convert.
Return Value
The UTC DateTime.
'Declaration Public Function ToUniversalTime( _ ByVal dateTime As System.Date _ ) As System.Date
public System.DateTime ToUniversalTime( System.DateTime dateTime )
Exception | Description |
---|---|
System.ArgumentException | dateTime.Kind is Utc and current time zone does not equal Utc -or- dateTime.Kind is Local and current time zone does not equal Local -or- dateTime value represents invalid time. |