alamb commented on issue #10602: URL: https://github.com/apache/datafusion/issues/10602#issuecomment-2210836390
I think we already have date_trunc docs: https://datafusion.apache.org/user-guide/sql/scalar_functions.html#date-trunc code: https://github.com/apache/datafusion/blob/dce77db316beb5bf5dc2326c350b2d642edbfed8/datafusion/functions/src/datetime/date_trunc.rs#L361 I think the difference between `date_trunc` and `date_bin` is that date_bin can bin to dates that are not aligned with the start/stop of the interval (e.g. you could bin days at noon rather than at midnight) However it is a good question if `date_trunc` would be a better way to get the desired behavior -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org