-
Notifications
You must be signed in to change notification settings - Fork 70
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
CSV -> DTA Conversion Fails to Format Dates Properly #312
Comments
Stata date variables are just |
@NilsEnevoldsen Thanks so much for the quick response, and further information. I'll give it a whirl and come back to close the ticket. 💯 |
We're continuing to see this issue, and several more experienced STATA users have told me that it is likely the format should be applied during the conversion process, since we are explicitly setting the When I use SAS to export the same data, the display format seems to be properly set to
And it shows up properly in the data:
|
I'm attempting to convert a
csv
file to STATAdta
format using the JSON metadata format.I've put together an example with just a few columns:
This is the JSON file I've generated to provide the metadata for the conversion:
The conversion seems to run properly:
Converted 3 variables and 120 rows in 0.01 seconds
However, when I open up the file in STATA v18, it doesn't properly format the dates. I've read through the code, and I seem to be triggering the proper
type
andformat
selection, as if I change them, it triggers an error. I'm a STATA novice, but here's what the CLI is reporting for the generated file:As you can see, it doesn't seem to be properly applying type or format, and when I tabulate, it displays as a number rather than a date. Have I uncovered a bug, or am I doing something wrong? I tried to follow the README and the spec.
The text was updated successfully, but these errors were encountered: