Thanks Tim,
I tried:
dateShifted = propsys.PyPROPVARIANT(
mDate + shift_time.timedelta_obj, pythoncom.VT_DATE)
and it reports:
module 'win32comext.propsys.propsys' has no attribute 'PyPROPVARIANT'
Should I import it from elsewhere? because the import I had is
from win32comext.propsys import propsys, pscon
On Thu, Nov 7, 2019 at 7:26 PM Tim Roberts <[email protected]> wrote:
> 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, [email protected]
> Providenza & Boekelheide, Inc.
>
>
> _______________________________________________
> python-win32 mailing list
> [email protected]
> https://mail.python.org/mailman/listinfo/python-win32
>
_______________________________________________
python-win32 mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-win32