Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jbrockmendel opened this issue Nov 6, 2023 · 2 comments
Closed

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

jbrockmendel opened this issue Nov 6, 2023 · 2 comments

Comments

@jbrockmendel
Copy link

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).

@evanmiller
Copy link
Contributor

There's not much I can do about a maybe-bug, so I'm going to close this issue. Feel free to re-open if you can confirm that a discrepancy exists between ReadStat and SAS.

@jbrockmendel
Copy link
Author

pandas-dev/pandas#56014 got confirmation that SAS produces a different results from both pandas and readstat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants