-
Notifications
You must be signed in to change notification settings - Fork 108
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
Question: ordering by timestamp fields #57
Comments
hi @endymion00 It funny that you ask because we have to do the same thing just last week. Yes, dynamoDB stores data type as string... so what you need to do is set the createdAt or updatedAt as the then on query, you'll need to do something along the line of:
|
hey @M1chaelTran, Thank you very much for help :) And yes, moment is the way to go. I feel very confident by using this module in all my node projects. In this case with one single of line of code it is possible to migrate from number dates to string dates easily. |
Hi,
I'm wondering how can I deal with sorting by using tiemstamp fields createdAt and updatedAt because there are strings and dynamoDB does not have a date type so numbers should be used.
Thank you in advance!
The text was updated successfully, but these errors were encountered: