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

Feature Request: date conversion and add functions #289

Closed
InverseFalcon opened this issue Feb 20, 2017 · 1 comment
Closed

Feature Request: date conversion and add functions #289

InverseFalcon opened this issue Feb 20, 2017 · 1 comment

Comments

@InverseFalcon
Copy link
Collaborator

Most of APOC's date/time functions deal with parsing a timestamp (at some time resolution) from a string, and formatting to go the other direction.

APOC could use some additional date functions for converting a timestamp between different resolutions, and adding/subtracting some amount of time at a specific resolution (though keeping the output at original resolution).

Some possible functions:

apoc.date.convert(<timestamp>, <timestampResolution>, <desired resolution>)
example usage:
return apoc.date.convert(timestamp(), 'ms', 'd') as todayInDayResolution

apoc.date.add(<timestamp>, <timestampResolution>, <numberToAdd>, <addResolution>)
example usage:
return apoc.date.add(timestamp(), 'ms', -3, 'd') as threeDaysAgoInMs

@InverseFalcon InverseFalcon changed the title Feature Request: additional date functions Feature Request: date conversion and add functions Feb 20, 2017
@jexp
Copy link
Member

jexp commented Mar 6, 2017

Thanks a lot @InverseFalcon !

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

2 participants