Skip to content

Difference between dates #9102

Answered by gforsyth
vmsaipreeth asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @vmsaipreeth -- you can use the delta method and specify `day' as the unit:

[ins] In [1]: import ibis

[ins] In [2]: from datetime import date

[ins] In [3]: ibis.options.interactive = True

[ins] In [4]: con = ibis.trino.connect(
         ...:     user="user",
         ...:     password="",
         ...:     host="localhost",
         ...:     port=8080,
         ...:     database="memory",
         ...:     schema="default",
         ...: )

[ins] In [5]: ibis.set_backend(con)

[ins] In [6]: t = ibis.memtable(
         ...:     dict(
         ...:         start_col=[date(2024, 4, 29)],
         ...:         end_col=[date(2025, 4, 29)],
         ...:     ),
         ...: )

[ins] In [7]…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@vmsaipreeth
Comment options

Answer selected by cpcloud
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants