Tuesday, 2 May 2017

How to pass a timestamp format parameter using NodeJS's $http?

I'm using NodeJS to build a RESTful application, and NodeJS's $http module (documentation here) to handle requests.

I didn't have any problems handling requests so far, nor passing parameters, such as ?name=joe, ?category=worker, or ?name=joe&category=worker.

However, I'm having problems filtering dates in the ISO format, such as 2017-04-13T18:35:49.924Z. When I use ?timestamp=2017-04-13T18:35:49.924Z, for example, nothing is returned.

I know that there are modules and APIs that can filter timestamps, such as what was shown in this question regarding Django admin, and this other question of tableau usage. They can even handle operators of greater than or less than, as shown in this page.

Can I filter timestamps using $http module? Are there greater than and less than operators, for example, or do I have to find another module?



via Ernani

No comments:

Post a Comment