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

Another item for the FAQ? Filter by date #208

Closed
aborruso opened this issue Dec 9, 2018 · 3 comments
Closed

Another item for the FAQ? Filter by date #208

aborruso opened this issue Dec 9, 2018 · 3 comments

Comments

@aborruso
Copy link
Contributor

aborruso commented Dec 9, 2018

Hi,
starting from

date,field
2018-02-03,a
2018-03-07,a
2018-02-03,b

apply

mlr --csv filter 'strptime($date, "%Y-%m-%d") > strptime("2018-03-03", "%Y-%m-%d")' input.csv

And obtain

date,field
2018-03-07,a

The FAQ could be "How to filter by date?"

The text could be: It's necessary to parse with strptime the field that contains date info and than apply the filter. In example ...

johnkerl pushed a commit that referenced this issue Dec 9, 2018
@johnkerl
Copy link
Owner

johnkerl commented Dec 9, 2018

http://johnkerl.org/miller-releases/miller-head/doc/faq.html#How_can_I_filter_by_date?

@johnkerl johnkerl closed this as completed Dec 9, 2018
@aborruso
Copy link
Contributor Author

aborruso commented Dec 9, 2018

Thank you

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

3 participants