preloader
軟體工程 Inquiry Rails ActiveRecord records between two dates

Follow below code for inquiring ones in ActiveRecord between two dates: YourModel.find(:date => somenumber.days.ago..Date.today) # or YourModel.find(:created_at => yourNumber.years.ago..Date.today) # or YourModel.find(:updated_at => yourVariable.months.ago..Date.yesterday) Aboved code are modified from a post at stackoverflow.com. Reference: http://stackoverflow.com/questions/2381718/rails-activerecord-date-between

read more

About

Howard Lee, Frontend-engineer with Typescript, JavaScript, HTML, CSS, Angular 19+, ReactJS, Next.js, GraphQL, Tanstack Query, Material-UI, Cypress, Postgres, Amazon Web Services, Google Cloud Platform Docker and TestCafe. Have a certificate of AWS Solution Architect Associate with verify number: 8FYNL55LCEEQ10W5. You can verify at AWS Certificate site or Credly site Tech lead role Lead 4 colleagues to build products and infrastructure Coordinate schedule of delivering products Senior web frontend developer role Products Team-management, form-filling, form-sharing, file-management, repair-management and project-management for construction industry at Suiqui IoT management and EC platform for Liquid Petroleum Gas(LPG) at Wave-In Comm.

Know More

Tag

Social