DEV Community

nomanmangalzai
nomanmangalzai

Posted on

How to send date with time in req.query parameter in Postman API hitting using Nodejs Technology

Hope everyone is fine there!
I am working on an e-commerce website. There is a collection named as transactions which stores the data of transactions.
I would like to filter the transactions based on date.
However, when I put the date in the as query param in the url, it gives me an error stating:
_`**(const castError = new CastError();
^

CastError: Cast to date failed for value "2024-04-03T19:00:00.000 00:00" (type string) at path "date" for model "Transaction").**`_
I would like to have a solution for this.
The postman API hitting is in the following image.

Image description

Top comments (0)