Skip to content

BUG?: maybe-incorrect reading large datetimes from SAS #306

@jbrockmendel

Description

@jbrockmendel

TLDR: running down a maybe-bug in pandas where I have confirmed the pandas behavior matches the readstat behavior, but have not confirmed the correct behavior.

I am trying to run down a 2020-era comment about a bug in the pandas SAS reader:

    # NB. max datetime in SAS dataset is 31DEC9999:23:59:59.999
    #    but this is read as 29DEC9999:23:59:59.998993 by a buggy
    #    sas7bdat module

I have confirmed that reading the file with pandas gets the Dec 29 datetime instead of the Dec 31 datetime. I have also confirmed that using pyreadstat (which wraps readstat) returns a Dec 29 datetime (though it rounds down the seconds).

What I haven't been able to do is read the file with SAS to confirm that the comment is correct about the expected date being Dec 31 (or whether the fractional second should be truncated).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions