On Sun, Sep 13, 2020 at 10:58:28AM -0700, Joe Cool <
snoo...@gmail.com> wrote:
> On Thursday, August 22, 2019 at 10:09:57 PM UTC-4
python...@raf.org wrote:
>
> > Hi,
> >
> > macosx-10.11.6, python-2.7.16 and python-3.7.4, openpyxl==2.6.3
> >
> > I'm seeing some strange behaviour reading cells with a
> > date and time. They come as a datetime.datetime object
> > with 3 microseconds added to the actual date/time in
> > the cell.
> >
> > I have a test spreadsheet where every such cell has the
> > 3 microseconds added to it.
> >
> > Does anyone know why that is? Or is it just me?
> >
> > cheers,
> > raf
>
> Could this be a rounding error? Excel stores datetime as a floating point
> number.
> --joe
Perhaps, but I'd wouldn't expect exactly three microseconds
every time. That doesn't feel like a rounding error. I never
got an answer to this question. I just had to discard the
microseconds because I knew none of people creating xlsx
files that I had to import would ever actually include
microseconds in their date/times.
cheers,
raf