_TimeZones.ConvertTime Method
Converts a DateTime value from one time zone to another time zone.
Namespace: Microsoft.Office.Interop.Outlook
Assembly: Microsoft.Office.Interop.Outlook (in Microsoft.Office.Interop.Outlook.dll)
Syntax
'Declaration
<DispIdAttribute()> _
Function ConvertTime ( _
SourceDateTime As DateTime, _
SourceTimeZone As TimeZone, _
DestinationTimeZone As TimeZone _
) As DateTime
'Usage
Dim instance As _TimeZones
Dim SourceDateTime As DateTime
Dim SourceTimeZone As TimeZone
Dim DestinationTimeZone As TimeZone
Dim returnValue As DateTime
returnValue = instance.ConvertTime(SourceDateTime, _
SourceTimeZone, DestinationTimeZone)
[DispIdAttribute()]
DateTime ConvertTime(
DateTime SourceDateTime,
TimeZone SourceTimeZone,
TimeZone DestinationTimeZone
)
Parameters
SourceDateTime
Type: System.DateTimeA DateTime value expressed in the original time zone.
SourceTimeZone
Type: Microsoft.Office.Interop.Outlook.TimeZoneThe original time zone of the DateTime value that is to be converted.
DestinationTimeZone
Type: Microsoft.Office.Interop.Outlook.TimeZoneThe target time zone to which the DateTime value is to be converted.
Return Value
Type: System.DateTime
A DateTime value that represents the date and time expressed in the DestinationTimeZone.