Sample code for 30+ languages & platforms
DataFlex

Transition from Email.GetDt to Email.EmailDateStr

Provides instructions for replacing deprecated GetDt method calls with EmailDateStr.

Chilkat DataFlex Downloads

DataFlex
Use ChilkatAx-win32.pkg

Procedure Test
    Handle hoEmail
    Variant vDateTimeObj
    Handle hoDateTimeObj
    Handle hoDt
    Boolean iSuccess
    String sTemp1
    Boolean bTemp1

    Get Create (RefClass(cComChilkatEmail)) To hoEmail
    If (Not(IsComObjectCreated(hoEmail))) Begin
        Send CreateComObject of hoEmail
    End

    // ...
    // ...

    // ------------------------------------------------------------------------
    // The GetDt method is deprecated:

    Get ComGetDt Of hoEmail To vDateTimeObj
    If (IsComObject(vDateTimeObj)) Begin
        Get Create (RefClass(cComCkDateTime)) To hoDateTimeObj
        Set pvComObject Of hoDateTimeObj To vDateTimeObj
    End
    Get ComLastMethodSuccess Of hoEmail To bTemp1
    If (bTemp1 = False) Begin
        Get ComLastErrorText Of hoEmail To sTemp1
        Showln sTemp1
        Procedure_Return
    End

    // ...
    // ...

    Send Destroy of hoDateTimeObj

    // ------------------------------------------------------------------------
    // Do the equivalent using EmailDateStr.

    Get Create (RefClass(cComCkDateTime)) To hoDt
    If (Not(IsComObjectCreated(hoDt))) Begin
        Send CreateComObject of hoDt
    End
    Get ComEmailDateStr Of hoEmail To sTemp1
    Get ComSetFromRfc822 Of hoDt sTemp1 To iSuccess


End_Procedure