How to do query of db by date? #1186
Unanswered
designlook
asked this question in
Q&A
Replies: 2 comments 1 reply
-
|
What all needs to be done. Would u be able to call me Sir
…On Mon, May 24, 2021, 8:34 PM Scott Yu ***@***.***> wrote:
I created a wildcard field called createdAt and it's Date.now() when I
create a record (example: 2021-05-25T06:43:27.241Z)
When I do a query, how would I filter it by something like createdAt <
Date.now() ?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1186>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ATI5UAHCRIAUDSNJOOIVY3DTPMLEFANCNFSM45OMPD2Q>
.
|
Beta Was this translation helpful? Give feedback.
1 reply
-
|
@designlook you got it right, store dates as unix time stamps and use common operators to query it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I created a wildcard field called createdAt and it's Date.now() when I create a record (example: 2021-05-25T06:43:27.241Z)
When I do a query, how would I filter it by something like createdAt < Date.now() ?
Beta Was this translation helpful? Give feedback.
All reactions