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

Storing date as Date in MongoDB #3522

Open
PenPa0 opened this issue Aug 6, 2024 · 0 comments
Open

Storing date as Date in MongoDB #3522

PenPa0 opened this issue Aug 6, 2024 · 0 comments

Comments

@PenPa0
Copy link

PenPa0 commented Aug 6, 2024

Hello!

Does FeathersJS have a way to store dates as Date instead of String in MongoDB? I'm trying to implement a date check and using the $gte and $lte queries, but the Dates are stored as String in MongoDB.

This is how I am currently storing them, as changing type: string to either type: Date / type: 'date' wont work.
createdAt: { type: 'string', format: 'date-time' }, updatedAt: { type: 'string', format: 'date-time' },
image

image

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

1 participant