Questions tagged [date-range]

Date-range refers to a range of dates, i.e. a period of time between a start date and an end date.

Date-range refers to a range of dates, i.e. a period of time between a start date and an end date.

Date range is commonly used:

  • as search criterion for any date related data,
  • when operating on data referring to periods of time.
1608 questions
0
votes
1 answer

Generate day rows from date range

I would like to run a query like select ... as days where `date` is between '2010-01-28' and '2010-02-03' And return data like: days --- 28 29 30 31 1 2 3
morne
  • 4,035
  • 9
  • 50
  • 96
0
votes
2 answers

MySQL - LIKE with trailing wildcard vs range search

I would like to find what is better approach, primary in matter of performance in my databse. Wildcard LIKE, or a range search? Lets have this table: | id INT | created DATE | some other columns ... | If I want to select entries that was created in…
Zopper
  • 132
  • 9
0
votes
3 answers

Getting Random Durations within a range in C#

For a random event generator I'm writing I need a simple algorithm to generate random ranges. So, for example: I may say I want 10 random intervals, between 1/1 and 1/7, with no overlap, in the states (1,2,3) where state 1 events add up to 1 day,…
Sam Saffron
  • 128,308
  • 78
  • 326
  • 506
0
votes
1 answer

Pull Apart Date Range into Separate Cells in CSV, Excel or Spreadsheet

I have a set of dates (a range of years) for each car part in a spread sheet. Each part has a different year range. For example, a muffler fits a Ford Mustang from 1972-1977. A mirror fits a Chevy Chevelle from 1969-1976. There are 8,000 parts…
bones_bare
  • 31
  • 1
  • 9
0
votes
4 answers

booking dates ranges mysql php

Again booking system and dates ranges. I've read this topic Comparing date ranges and many others, but can't find answer :( Please see SQLFiddle http://sqlfiddle.com/#!2/89b2b/2 I have booking table, that have ID, ObjectID, PeriodStart and PeriodEnd…
Lari13
  • 1,850
  • 10
  • 28
  • 55
0
votes
1 answer

MySQLi query with date range criteria

The following code works well so far for searching on multiple fields. How can I include a date rage criteria in it to search with (startdate, enddate)? The date field is named "IncidentDate" in the table "t_persons" $criteria = array('FamilyName',…
user1868306
  • 75
  • 1
  • 14
0
votes
2 answers

Mysql select dates that doesn't intersects with booked date ranges

I have a table of dates, each date represent a task, the task takes three days to complete. I want to select all the unbooked dates that doesn't intersects with another booked task. I've been trying and googling for three days now and I think it is…
Aus
  • 1,183
  • 11
  • 27
0
votes
0 answers

Searching a hashmap by overlapping dates in key

I'm guessing that I'm just going about this all wrong, but I was curious so I thought I'd ask. I'm working on a reservation system just to brush up on some design patterns. I have a Room class and Customer class, and I want to keep a schedule of…
0
votes
1 answer

Dan Grossman Daterange Picker

I have a strange behavior on the date range picker from dan grossman (based on bootstrap). It works fine except on very small browsers like mobile : the datepickers are one above the other, that's ok. But the Start date is BELOW the and date and…
0
votes
3 answers

Get max values in PostgreSQL 8.0

I'm Using Amazon Redshift. I need to get the MAX Date in the column by Month wise. The Example is as below. There are 5 tables: vendor vendor_pkg vendor_pkg_category vendor_load vendor_load_status vendor V vendor_id …
Benny
  • 432
  • 1
  • 6
  • 21
0
votes
2 answers

Negative dates in SQLite

Newly compiled SQLite displays a strange behavior concerning the date/time functions. Do you have any idea what is going on and how to fix it? $ date Mon Mar 8 14:52:11 CET 2010 $ ./sqlite3 TEST0 SQLite version 3.6.22 Enter…
SF.
  • 13,549
  • 14
  • 71
  • 107
0
votes
1 answer

jQuery filters wrong data by date-range

I am trying to filter data by date-range using jQuery on the client side but it is not doing it properly, It is showing me data (dummy) from the year 2065 and onwards (linked the Screen shot below). I have been trying for almost a week now but…
0
votes
1 answer

JQuery get list of available date objects from datepicker

I have the following datepicker set up: