Home>
I want to search for Date type so that I can narrow it down by the month of birth.
The database uses postgresql, and there is data stored as a date of birth in the form "2010-06-03 09:00:00+09" of type timestamp with time zone.
I want to narrow down these by birth month, and I tried to search like like the other data types like the following, but I get an error.
birth: {
[Op.like]:'%' +'-06-' +'%'
}
SequelizeDatabaseError: operator does not exist: timestamp with time zone ~~ unknown
The search itself is possible by adding a new birth month column, but is there a way to do a like search for Date type (timestamp with time zone type), or is there another good way?
Version of each library
express: 4.17.1
sequelize: 5.21.12
pg: 8.2.1
-
Answer # 1
Related articles
- nodejs + postgresql like statement error partial match using variables
- [nodejs] i want to create two or conditions with sequelize
- python - perform a character string search on the dataframe using the for statement and divide it into multiple dataframes
- java - i want to perform search evaluation of board games without using recursive expressions
- postgresql - db, sequelize: when trying to get two data at the same time, there are times when both can be acquired and times wh
- java - i want to perform fuzzy search using bind variables
- nodejs - when i installed sequelize with yarn, an error was displayed
- java - i want to perform a conditional search and display the results
- postgresql - how to search date in timestamp of postgres
- postgresql - local execution of nodejs sample files using heroku database connection
- i want to deploy react + nodejs + postgresql app to heroku
- Nodejs package method for basic postgresql operations
- PostgreSQL Nodejs implementation function calculation example
- How to configure sequelize time zone in Nodejs
- NodeJS sample code for operating MySQL with Sequelize
Related questions
- node.js : Submitting a React Form
- node.js : Is this a common variable for all users?
- node.js : Express program breaks
- node.js : Express Gateway does not work the EG command in the console?
- mysql : Protocol_enqueueue_after_fatal_error
- javascript : Sending a request from Node JS to PHP
- node.js : Show real-time logs at running the WebApplication script on Nodejs /Express
- node.js : HTTP-Proxy-Middleware does not work
- node.js : Nodejs PayloadToolergeerror: Request Entity Too Large When I send Binary
- node.js : Cookies are not transmitted in the request header, Node, React
I was able to narrow down by doing.