Peng Chen wrote:
Hi Tim,
 Thanks for the reply. Sorry for the late. I just found your email today. Yes I tried with this code:

from win32comext.propsys import propsys, pscon
VIDEO_DATE_ENCODED = pscon.PKEY_Media_DateEncoded
properties = propsys.SHGetPropertyStoreFromParsingName(file_name)
mDate = properties.GetValue(VIDEO_DATE_ENCODED).GetValue() # got the datetime object
dateShifted = mDate + shift_time.timedelta_obj # shift date
properties.SetValue(VIDEO_DATE_ENCODED, dateShifted) # set value
properties.Commit()

and I got error message when executing to
properties.SetValue(VIDEO_DATE_ENCODED, dateShifted)

I found it.  Try

  dateShifted = propsys.PyPROPVARIANT(mData + shift_time.timedelta_obj, pythoncom.VT_DATE)

--
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

Reply via email to