noob saibot
noob saibot9mo ago

Uncaught Error: `new Date()` with non-number arguments is not supported

I'm saving date as iso string (with timezone info) in my table. Then in a function, I would like to use this date in my business logic code. When I try to create a new date from the saved value with new Date(table.some_date), I'm getting above error. Does that mean that in convex, dates should alway be saved in db as number? This is not what I seemed to understand from the docs
1 Reply
erquhart
erquhart9mo ago
This is a known issue, relevant thread here: https://discord.com/channels/1019350475847499849/1171508877095874570/1171509623937835099 You can definitely persist date values as strings in Convex. This issue is specifically from passing a non-number value to new Date() in the convex runtime.

Did you find this page helpful?