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

Parse date/time formats #10

Closed
hadley opened this issue Feb 6, 2015 · 10 comments
Closed

Parse date/time formats #10

hadley opened this issue Feb 6, 2015 · 10 comments

Comments

@hadley
Copy link
Member

hadley commented Feb 6, 2015

No description provided.

@hadley
Copy link
Member Author

hadley commented Feb 9, 2015

  • Update ReadStat to get latest behaviour
  • Add POSIX support to TimeFormatStrings or wait for Rexamine project

@hadley
Copy link
Member Author

hadley commented Feb 27, 2015

@afleishman since you're interested, is there any chance you could make me a sav file containing date times with one column for each date-time type?

@afleishman
Copy link

Of course. I created this file using write_sav. There are three columns -- First, is date type, next is POSIXct, and finally character. Let me know if you need anything else!

https://github.com/afleishman/spss/blob/0244b4836c63adff180cbf65ec0a9182733fc19b/test_haven.sav

@hadley
Copy link
Member Author

hadley commented Feb 27, 2015

@afleishman can you please create with spss? (not haven, since that's what I'm trying to test)

@afleishman
Copy link

@hadley
Copy link
Member Author

hadley commented Feb 27, 2015

@afleishman could you add a column with a time variable please?

@afleishman
Copy link

https://github.com/afleishman/spss/blob/master/test_time_spss.sav

first column type: Date (mm/dd/yyyy)
second column type: Date (dd-mmmm-yyyy hh:mm:ss)
third column type: Date (hh:mm:ss.ss)

@hadley
Copy link
Member Author

hadley commented Feb 27, 2015

I'm currently getting

        date            date.posix     time
1 2014-09-22 201416-09-22 00:00:00 12:11:10
2 2014-09-23   2014-09-23 15:59:20 15:59:20

And I suspect that the first date.posix is incorrect. What is it supposed to be?

@evanmiller any thoughts on why only the first value is getting read incorrectly?

@afleishman
Copy link

Actually, it was a typo on my part... what you've produced is correct. Sorry about that.

@hadley
Copy link
Member Author

hadley commented Feb 27, 2015

In that case, awesome :)

@hadley hadley closed this as completed Feb 27, 2015
@lock lock bot locked and limited conversation to collaborators Jun 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants