Skip to content

[C++] Implement datediff kernel #29199

@asfimport

Description

@asfimport

Add a kernel to compute the number of years, months, weeks, days, hours, minutes, (micro/milli/nano)seconds, or quarters between two timestamps.

This should act like SQL's DATEDIFF (SQL Server). Pandas doesn't have a convenient equivalent except in the case of days (pd.Timedelta.days) but it can be calculated using Timestamp.to_period.

We have hinnant's date library vendored and this should hopefully be implementable with that.

Reporter: David Li / @lidavidm
Assignee: David Li / @lidavidm
Watchers: Rok Mihevc / @rok

Related issues:

PRs and other links:

Note: This issue was originally created as ARROW-13548. Please see the migration documentation for further details.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions