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: strptime does not handle non-zero-padded values #1198

Closed
johnkerl opened this issue Feb 23, 2023 · 1 comment
Closed

Bug: strptime does not handle non-zero-padded values #1198

johnkerl opened this issue Feb 23, 2023 · 1 comment

Comments

@johnkerl
Copy link
Owner

    Hi, I'm running into an issue when attempting to parse non zero-padded values with `strptime`:
echo d='1/6/2022' | mlr --opprint put '$ts = strptime($d,"%m/%d/%Y")'

Output

d        ts
1/6/2022 (error)

Support for non zero-padded values with the standard strptime format strings appears to be platform-specific, but I cannot find any details on whether they are supported in Go or Miller.

If non zero-padded values are not supported in Miller's strptime implementation, is there a different approach for handling such date formats?

Thanks.

Originally posted by @archetyped in #1197

@johnkerl
Copy link
Owner Author

Duplicate of #1355 1355

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

No branches or pull requests

1 participant