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

SAS date formats (YYMMDDxw) not converted #324

Closed
andrewsali opened this Issue Nov 20, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@andrewsali
Copy link

andrewsali commented Nov 20, 2017

I have come upon SAS files where the date format string is not purely YYMMDD but a bit more detailed - YYMMDDN in my case. These are not converted to R dates by haven but left as doubles.

It appears that there are multiple date formats in SAS: http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000589916.htm

However these extended ones are not considered:

else if (format == "YYMMDD") return HAVEN_DATE;

Would it be possible to load these extended formats as dates as well?

@hadley

This comment has been minimized.

Copy link
Member

hadley commented Jan 7, 2018

Looks like we should switch to hasPrefix() here because all of the date formats can be followed by optional parameters.

@hadley hadley added the feature label Jan 7, 2018

@hadley hadley closed this in ba00f03 Jan 16, 2018

@lock

This comment has been minimized.

Copy link

lock bot commented Jul 15, 2018

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Jul 15, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.