balderdashy / balderdashy/sails

sailsjs createAt and updateAt issue when converting to datetime

Open
#4,546 2 comments 0 reactions 0 assignees View on GitHub
does this answer your question?
Dominant language
JavaScript
Stars
22.8k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

Sorry i don't have any of these details to hand as i've just been given a rest api built with sails. if you can still help me that would be great.

The createdAt has been converted from the standard unix to datetime, which is great for me when formatting on the frontend.

`"createdAt": "2018-11-01T11:49:53.700Z",`

however this is not letting me search by date range. tried the following
```

api2/items?createdAt={'>=":2018-11-01T11:49:53.700Z, '<=":2018-11-01T11:49:53.700Z}

/api2/items?where={createdAt: { '>=': 2018-11-01T11:49:53.700Z, '<=': 2018-11-01T11:49:53.700Z }}

```
Can this be done?

Contributor guide

Open the contributing guide

Research direction

No source files, tests, or entry points are mentioned. Start by reproducing the supplied date-range requests against the Sails REST API and consult the query and date-filtering behavior; the issue is complete only when the supported syntax or limitation is established and documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
api, backend
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.