Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6113401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:51:16+00:00 2026-05-23T14:51:16+00:00

For a project I’m currently working on the user needs to be able to

  • 0

For a project I’m currently working on the user needs to be able to add a specific date, weekly dates (e.g. every wednesday 12pm), or monthly dates, (e.g. every 1th of the month 8pm).
The dates are the primary thing a user would search for. And that the first upcoming date is findable is the most important.

Thought about it for a while, but I’m not sure where to go with it. This is something I came up with:

Add a certain amount of records for the giving dates, and update these every day, or week.

Problem here is, what do I do when a user searches for 2020 and the record isn’t added because it is such a long time from now. Or what if the time is changed. How do I easily find the right records back?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T14:51:17+00:00Added an answer on May 23, 2026 at 2:51 pm

    I don’t think adding multiple entries for each dates is a feasible solution, in part because of the issue you described. It’s also potentially going to be a very quick way of blowing out your database size, particularly if there are a lot of users/dates.

    My first thought would be to move away from the timestamp columns for this. This is in part so that you don’t have to create multiple records, but also to make querying a lot easier.

    I would separate logical units into different columns. Something like this, for the dates you described:

    id | wday | mday | hour | minute |
    ----------------------------------
    1  | 3    | NULL | 12   | 00     |
    2  | NULL | 1    | 20   | 00     |
    

    This way, it would be very easy for you to find dates for Wednesdays (Model.where(:wday => 3)) or the first of every month (Model.where(:mday => 1)), and it would also allow you to display results for any given year, month, or week, etc, for the rest of eternity.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Every project invariably needs some type of reporting functionality. From a foreach loop in
Project: http://design.vitalbmx.com/fave/news.html When I click Add to favorites button (under main pic), in Chrome
A project I'm working on at the moment involves refactoring a C# Com Object
My project is based on spring framework 2.5.4. And I try to add aspects
My project is currently using a svn repository which gains several hundred new revisions
The project is ASP.NET 2.0, I have never been able to reproduce this myself,
Project I'm working on uses jQuery. I have a series of Ajax calls being
Project Euler 126 says: If we then add a second layer to this solid
Project file here if you want to download: http://files.me.com/knyck2/918odc So I am working on
Project (id) Permission (project_id, user_id) When user's create a project, I want to ensure

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.