Partager via


_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.DateTime

    A DateTime value expressed in the original time zone.

Return Value

Type: System.DateTime
A DateTime value that represents the date and time expressed in the DestinationTimeZone.

See Also

Reference

_TimeZones Interface

_TimeZones Members

Microsoft.Office.Interop.Outlook Namespace