Working with datetimes in documents
How can I compare to get documents ( bookings ) set at before or after a specific time, should I save timestamps and and the timezones as separate columns, it seems very unintuitive
2 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
Highly recommended capturing all dates in UTC
I currently send the user's timezone info with most of my queries for calculating on the backend, but you may also be able to get away with just sending UTC timestamps from the client for any comparisons, then displaying times in a given timezone is a client-only problem.