Chilkat2-Python
Chilkat2-Python
Transition from Email.GetDt to Email.EmailDateStr
Provides instructions for replacing deprecated GetDt method calls with EmailDateStr.Chilkat Chilkat2-Python Downloads
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)