Sample code for 30+ languages & platforms
Chilkat2-Python

Transition from Email.GetDt to Email.EmailDateStr

Provides instructions for replacing deprecated GetDt method calls with EmailDateStr.

Chilkat Chilkat2-Python Downloads

Chilkat2-Python
import sys
import chilkat2

email = chilkat2.Email()

# ...
# ...

# ------------------------------------------------------------------------
# The GetDt method is deprecated:

# dateTimeObj is a CkDateTime
dateTimeObj = email.GetDt()
if (email.LastMethodSuccess == False):
    print(email.LastErrorText)
    sys.exit()

# ...
# ...

# ------------------------------------------------------------------------
# Do the equivalent using EmailDateStr.

dt = chilkat2.CkDateTime()
dt.SetFromRfc822(email.EmailDateStr)