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

PHP mysql select with group by date range

I have table in MySQL: Question: How to group each row by 1 hour interval from range? Wanted output: range1 = 2014-01-28 00:00:00 to 2014-01-28 01:00:00 range2 = 2014-01-28 01:00:00 to 2014-01-28 02:00:00 range3 = 2014-01-28 02:00:00 to 2014-01-28…
Ing. Michal Hudak
  • 5,338
  • 11
  • 60
  • 91
0
votes
2 answers

Group by each date in a range having events with StartingTimestamp and EndingTimestamp

I would like to count all the events having in a calendar within January and group them by date. This events got a StartingTimestamp and an EndingTimestamp. For example (Table rp.Calendar): StartingTimestamp EndingTimestamp Title 24.01.2014…
Sven Kannenberg
  • 859
  • 2
  • 10
  • 20
0
votes
1 answer

NoMethodError: undefined method `each' for Sun, 19 Jan 2014:Date

I'm trying to iterate over a Date range. date_value_start and date_value_end are two values of the Date class. Why is the code below returning the error message: "NoMethodError: undefined method `each' for Sun, 19 Jan…
Fellow Stranger
  • 32,129
  • 35
  • 168
  • 232
0
votes
1 answer

Sql server 2008 : Query to search for today's date within overlapping dates

I have the above table wherein I need to get NoteIndx matching today's date. Just for testing, assume today is 2013/06/02 (Jun 2,2013) and that would get me two records with noteindx 93105 and 104044. But the correct value here is 104044 as I…
Anirudh
  • 581
  • 5
  • 14
  • 32
0
votes
2 answers

MySQL query for check alerts during a timelapse and condition

Hello I have next table: EventID datetime value 1 2012-12-15 12:45:06 15.3 2 2012-12-15 13:00:06 16.9 3 2012-12-15 13:15:06 17.3 4 2012-12-15…
ManuParra
  • 1,471
  • 6
  • 18
  • 33
0
votes
1 answer

Return all dates between multiple dates in a single array

$start = new DateTime('2013-08-16'); $interval = new DateInterval('P1D'); $end = new DateTime('2013-08-20'); $end->add(new DateInterval('P1D')); $period = new DatePeriod($start, $interval, $end); foreach ($period as $date) { echo…
dimoss
  • 479
  • 1
  • 3
  • 10
0
votes
2 answers

Jquery bassistance: validate that end date is after start date

I am using jquery bassistance validation and need to verify that a start date is after an end date. I am wondering if anyone knows if this functionality exists and if I can add rules to do this or if I have to add a custom check. I am having…
ks.
  • 3
  • 1
  • 2
0
votes
1 answer

mysql date breakdown between date range

I have a mySQL record like this name sdate edate John 2013-12-01 2013-12-04 Will 2013-12-04 2013-12-06 Smith 2013-12-02 2013-12-05 I need a single query for result like this name stay_date John 2013-12-01 John …
0
votes
1 answer

Date range vtype, cannot understand how it works, extjs 4

i have a form with two date fields, they have to define a date range, so the end cannot be before the start; and they both are made by two datepicker, which should disable the dates before the "start" in the "end". I've found this manual page with…
softwareplay
  • 1,379
  • 4
  • 28
  • 64
0
votes
0 answers

Find free time slots based on two date columns in a table

I have a problem with a scheduling system that has one table with 2 date columns. Very similar to the problem outlined in this question: mysql-find-free-time-slots-between-appointments CREATE TABLE bookings (`id` int, `StartDate` datetime, `EndDate`…
SlapMe
  • 9
  • 1
0
votes
1 answer

Core Plot: Pinch to change x axis range

So I have a simple line XY Graph with integer values on the Y axis and dates on the X axis. What I would be like to be able to do is do a horizontal two-finger pinch and adjust the range dynamically. Eg, pinching in would give you a bigger range…
Sam Jarman
  • 7,277
  • 15
  • 55
  • 100
0
votes
2 answers

jQuery: retrieve datepicker date, check if inside date range, display/hide fields

I have an online form and I want to hide/display specific fields based on the date the user selects in a datepicker field. However, the date they select must fall within a specific date range in order for the additional fields to be…
Iconoclast
  • 191
  • 1
  • 3
  • 12
0
votes
1 answer

How to find if time in a range defined by time and interval in Oracle Database?

Is there a straightforward way to find if a time is between two times? (00:00-23:59) I represent the times by the starting time and an DAY TO SECOND interval, because I want to account for the interval overlapping midnight. For instance: I have a…
Martin Melka
  • 7,177
  • 16
  • 79
  • 138
0
votes
1 answer

User date range input against a series of date ranges in MySQL

I need to search a user's date range input against a series of date ranges in a MySQL table. Perhaps an example might explain this better. Let's say I have a "Hotel" database with a "Rates" table. One row is for "Fall," from September 1 to November…
user2975310
  • 51
  • 1
  • 4
0
votes
1 answer

Need to graph the number of open items in a DB based on the # of days it has been open

I am working on a WO Aging report and I need to figure out the following information: Need to group by Trade Need to group by Status Need to know how many work orders are in each status that are: open for 1 week open for 2 weeks open for 3…