[python-win32] Comparing dbase date value with os.path.getmtime(filename)
Jim.Vickroy@noaa.gov
Jim.Vickroy at noaa.gov
Fri Oct 14 18:46:22 CEST 2005
You may wish to take a look at the time module (specifically)
time.gmtime(...) or time.localtime(...)) to work with the return value
from getmtime(...).
Can't really help much with the return value from the database since I
don't know what type of object it is. If you are using Python 2.3 or
later you may wish to look at the datetime module (specifically
datetime.datetime).
HTH,
-- jv
----- Original Message -----
From: Randy in Wash st <wawork at hotmail.com>
Date: Friday, October 14, 2005 10:20 am
Subject: [python-win32] Comparing dbase date value with
os.path.getmtime(filename)
> I have a python script that opens a dbase table and reading a
> lastmod date
> file. I would like to compare this value with the system datetime
> of a file
> on the network. The os.path.getmtime(filename) function returns
> the time in
> 9 digit sequence. The dbase date prints out as 09/13/2005
> 12:00:00 AM while
> the getmtime returns 1126729268.
>
> How can I convert the datetime coming from the dbase record with
> the modify
> datetime of a file so I can determine which date is older?
>
> Thanks,
> r
> wawork at hotmail.com
>
>
> _______________________________________________
> Python-win32 mailing list
> Python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>
More information about the Python-win32
mailing list