1,682 questions
-4
votes
1
answer
63
views
How to precompute nested date ranges efficiently to optimize range filtering and pagination? [closed]
📝 Body
I have a Mongo collection CollectionA where each top-level object contains a nested array of meetings now each meetings have start and end times, for example:
CollectionA = [
{
&...
1
vote
1
answer
74
views
Postgresql with daterange on the same day
I'm trying to create a virtual column called period created by 2 other columns starting_date (time) and ending_date (time).
The aim is to avoid overlapping of periods for the same user.
Here is my ...
0
votes
1
answer
64
views
PostgreSQL alter column type from tstzrange to daterange
Similar to this SO question, how to convert a tstzrange value to daterange (ignoring the time part) ?
alter table x alter column y type daterange using y::daterange;
Ouput:
ERROR: cannot cast type ...
1
vote
3
answers
164
views
How does the Postgres daterange() function work?
This SQL:
select daterange(current_date, current_date);
Results in:
daterange
-----------
empty
(1 row)
But the daterange() function does not seem to be documented. I've looked here and there. ...
3
votes
3
answers
152
views
Find dates common in different rows
I have a table which has 3 columns:
task_name -- data type is varchar(50)
start_date -- data type is date
end_date -- data type is date
I want to list the dates which fall within the range (between ...
-1
votes
1
answer
95
views
Matching holidays between two dates (SAS TO SQL)
I have two tables one with request dates and SLA and the other with the list of dates of US holidays.
I want to write query that checks if any of the holidays fall between the request dates and the ...
0
votes
1
answer
69
views
Summing event durations in SQL with input time range, accounting for splitting event times, and incomplete events for OEE
I need to calculate OEE (Overall Equipment Effectiveness) for a set of production data given a start and end timestamp.
The value I'm stuck on is Availability %, which is (time running/time requested) ...
1
vote
2
answers
92
views
SQL join 2 table with date, filtered and grouped by a week number
I have 3 tables in SQL:
Agency, booking and checkin (and rooms)
I need to compute a % of checkin / booking, by week number (of begin), by agency
Here somes tables for example
Agency :
id
name
1
first
...
2
votes
2
answers
100
views
How to represent ranges of time in a pandas index
I have a collection of user data as follows:
user
start
end
John Doe
2025-03-21 11:30:35
2025-03-21 13:05:26
...
...
...
Jane Doe
2023-12-31 01:02:03
2024-01-02 03:04:05
Each user has a start and end ...
1
vote
5
answers
191
views
How can I write iterative query on Oracle SQL?
I have the columns party_id and data_date. I want to sort the data_dates in ascending order for each party_id. I will always take the first data_date. After that, the data_date I select must be at ...
1
vote
2
answers
82
views
SQL Query to combine overlapping times from same table to make decisions
I have a set of database tables in Microsoft SQL Server "in the example flattened to keep this example easy" that is a bunch of time clock records for employees that looks like this.
Call ...
-1
votes
1
answer
72
views
Day with the highest number of active users in the last 4 months in a Delinea report?
I'm working on a Delinea report and need to generate an SQL query to find the day with the highest number of active users simultaneously over the last 4 months. My database has columns like UserId, ...
2
votes
2
answers
78
views
Identify duplicates within a period of time using Redshift SQL
In a table, I have plan details of customers with their customer_id and enroll_date.
Now, I want to identify duplicate and valid enrollments from the overall data.
Duplicate: If a customer enrolls a ...
4
votes
6
answers
134
views
Counting dates in a range of dates
I have a pandas dataframe that contains two date columns, a start date and an end date that defines a range. I'd like to be able to collect a total count for all dates across all rows in the dataframe,...
-2
votes
2
answers
81
views
count how many event between dates sql in different rows
I am trying to count number of overlapping events between dates in SQL. Let’s assume some dates for room reservations in a hotel. Like this:
start
end
14.01.2024
17.01.2024
15.01.2024
17.01.2024
17.01....
0
votes
2
answers
62
views
Find orders in the same time frame in Oracle
here is the data as an example
select 'part1' as part , 'supplierAAA' as supplier , 'order1' as order_name, 'E' as order_type , to_date('01-01-2023','dd-mm-yyyy') as start_date , to_date('31-12-2023'...
-1
votes
1
answer
115
views
Consolidate data based on date range
We're working on migrating data from a legacy application and have a requirement to get all the consecutive SESSION START_DATE & END_DATE. For the SESSION_ID - 8642, SESSION_TYPE - 3256, based on ...
0
votes
0
answers
57
views
How to make a data frame reactive to changes of a date range?
I have got two data frames "Table 1" and "Table 2".
Features of the data frame "Table 2" are the following:
It is created by means of rhandsontable and, hence, new rows ...
0
votes
0
answers
159
views
How to set orders that execute at a particular time within a day in Pinescript
I'm new to Pinescript language in Tradingview. I want to backtest a simple day trading strategy where I buy $4000 worth of AAPL shares everyday at market open (9:30 AM EST) and sell them 1 minute ...
0
votes
2
answers
241
views
How do I split a value between two years over a date range in Excel?
This might be more simple than I'm making it, but I have yet to find or create a working function for this problem. I have data for upcoming projects that could begin and end anytime over the next two ...
-1
votes
2
answers
132
views
Saving an Excel file using the data range as file name in C#
I have an export to a .xlsx spreadsheet in Excel which is generated when the user supplies a date range and the car name. This works at the moment and displays the data correctly. The file name must ...
0
votes
0
answers
68
views
Plotly Express - how to set date slider on x,y scatter plot
I'm trying to make a scatter plot that allows me to do a couple things:
Toggle a selected date range that automatically displays the coordinates for each day within the range - I figure some sort of ...
0
votes
1
answer
73
views
R Shiny app connected to BigQuery cannot filter by dates
I'm working on a R Shiny app that used to load the data from a CSV file and display it on a plot. The user had the ability to do some filtering via dropdowns and dateRangeInput selectors.
My goal is ...
0
votes
0
answers
23
views
Unaligned relative date range
How to define Relative date range in time dimension to query exactly last 24 hours with no time unit alignment?
Assuming current time is 2024-12-10T15:35:48.000.
How to query data from 2024-12-09T15:...
0
votes
0
answers
32
views
Pandas check for records for a lag before a certain date range of interest and exclude
I want to check for a date range of interest but the problem is that one of my constraints is dependant on records before data range.
My example is that I'm interested in novice race records from 2018 ...
0
votes
1
answer
104
views
SQL query to audit employee claim based on specific sequence of rows defined by criteria
I need to create an exception/audit report for our accounting section.
The business case is an employee is deployed to remote location and can claim lodging cost if they are away from their family. If ...
-3
votes
1
answer
180
views
Turn a list of dates into Fridays Only
Update:
Here is what I am trying to do. I have 3 columns of random dates; I'd like to combine these in one array and produce a column containing ONLY Friday dates (i.e., for weeks in which a date ...
0
votes
1
answer
98
views
Get date range using moment.js
I am trying to get a Saturday to Sunday date range using moment.js.
It works up to last line and after that both start and end dates equal to end date.
Using today's date (Nov. 1, 2024), I can see ...
0
votes
1
answer
57
views
Filtering the specified records in Webforms
Problem:
I'm working on an ASP.NET WebForms application where I need to filter records in a DataTable based on a date range. The date range is selected using FromMonth, ToMonth, FromYear, and ToYear ...
1
vote
1
answer
118
views
Get User total amount spent from a defined date range in WooCommerce
I've been trying to get my head around some code I've been modifying to fit my purpose and needs. In a nutshell, I want to display the total amount of money spent for a user on the frontend (Based on ...
0
votes
1
answer
144
views
Filtering a Table for a date range that exists in two date columns
I am fairly fresh here so please forgive me if this has been asked previously. I have a data model in MS PowerBI which has a date table and a fact table with two date columns (ME_PostDate, ME_Rec_Date,...
-6
votes
2
answers
180
views
Highlight overlapping time in Google sheet for a range of data with Start and End Time in Columns
PART A
There are multiple rows of data in a Google Sheet with start and end times in the format as shown in the picture. This data is already processed and filtered out from a larger data set to ...
-2
votes
2
answers
753
views
Create Weekly Date Range in Excel
Much appreciate all of you for helping me to solve my case in Excel.
I want to create a date range in Excel but the data I have will have a lot of repetition because it is based on the ticket creation ...
1
vote
1
answer
112
views
Postgres split time ranges into 1 minute slots, without rounding boundaries
I have a postgres table with timestamp columns:
start_datetime
end_datetime
duration
id
2021-10-17 03:13:00
2021-10-17 03:15:02
302
6214550
2021-10-17 03:15:02
2021-10-17 03:17:03
4,021
6214551
which ...
0
votes
2
answers
78
views
Group 2d array of dates and values by contiguous dates with the same value
I have a date range 2023-11-01 to 2024-01-04 and some date have different MinStay value.
This is my array of date range
$input = [
[ 'date' => '2023-11-01', 'MinStay' => 1 ],
[ 'date' => '...
1
vote
3
answers
74
views
Date/Element range index on MM-DD-YYYY format in MarkLogic
Have user data with timestamp in the below format and stored as string.
MM-DD-YYYYThh:mm:ss
Sample:
{
"Name":"myname",
"created":"12-17-2014T13:40:07"
}
I ...
0
votes
1
answer
55
views
Data is not getting inserted into proper partition
I have a table with proper partition.
Code snippet:
CREATE TABLE RSA_DBA.RSA_ADHOC_ACCT
(
RSA_ACCT_DTL_GID NUMBER(12,0) NOT NULL,
EFF_DT DATE NOT NULL,
RSA_CMPSN_REC_GID NUMBER(12,0), ...
6
votes
1
answer
104
views
Datetime hours range search in mongodb
MongoDB Aggregation - Find Documents within Specific Hour Range and Date
I have a MongoDB collection with documents containing an orderDate field of type ISODate. I want to find the documents where ...
0
votes
1
answer
53
views
Empty dateRangeInput() is giving an error
My previous question 1 was about managing empty dateRangeInput(). My previous question 2 was about error-handling when an initial date is posterior to an end date.
I have integrated the solutions to ...
0
votes
1
answer
58
views
Exclude dates not within specific ranges from a user-selected date range in node.js?
I have an array of multiple start and end date ranges and a user-selected start and end date range. I need to exclude the dates from the user-selected range that do not exist within the specified date ...
1
vote
2
answers
789
views
Cannot Include a Date Range for my Amadeus API Requests for Flight Offers
I am using Python and I am reading the documentation and using the Get request to search for Flights under a certain price for a project in my online course. I am able to get my requests to go ...
0
votes
0
answers
84
views
Extracting records in a range in excel
Hi I have an Excel table with about 7k records.
I want to extract specific records in to a new table that have a date range of >=date1 and <=date2 The main table has a date field
I was trying to ...
0
votes
2
answers
208
views
Get the datetime range between two dates
I have implemented below code to get date range -
from datetime import timedelta, date,datetime
def daterange(date1, date2):
# Iterate over the range of days between date1 and date2
for n in ...
0
votes
1
answer
186
views
Flutter syncfusion date range circle not in center
daterangepicker image i want to ask how to make this circle place in center of the date,
here is my code
showDialog(
barrierDismissible: false,
context: context,
...
1
vote
1
answer
271
views
Polars: Create a new column with an array of dates from two different date columns storing the start and end of the range
I have a dataframe with a date start and date end (Start Promotion and End Promotion). I would like to use Python Polars to create a new column (from the previously mentioned columns) that will be an ...
0
votes
2
answers
105
views
Power BI Days in a given week of a month
I have the following columns - Week of Month, Month, Year, Date, & Days in Week.
I am trying to show in the column "Days in Week" in this format: 1 - 4, 5 - 11, etc.
In other words, I ...
-2
votes
1
answer
76
views
have a list of week numbers, how can I find the days corresponding to it python [duplicate]
I have a list of weeks for 2024: wks = [2,3,4,5,6,7...18]
How can I extract the dates that correspond to each week, bearing in mind, that the week starts on a Tuesday?
As Jan 1, 2024 was Monday, I ...
0
votes
1
answer
105
views
how to repeat date range Between 2 Dates via linq in vb.net
I'M trying to repeat date range Between 2 Dates via linq in vb.net
Below is the start and end date information in the datetimepicker control
startDate = 16-Mar-24
endDate = 22-Mar-24
so I want to ...
2
votes
2
answers
125
views
how to query based on start and end period dates with MS ACCESS in VB.NET
I'M trying to query based on start and end period dates with MS ACCESS in VB.NET
Table ABSEN can union with table HELPERABSEN
so I want to take the start date and end date from the table PERIOD with ...
1
vote
2
answers
80
views
How can I turn date intervals given in columns and extract the volumes per hour in the time interval for muiltiple overlapping periods?
I have the following df:
Start_Date End_Date Relevant Volume
2024-10-01 2024-12-31 False 0.000000
2025-01-01 2025-03-31 True 0.097989
2025-04-01 2025-06-30 True -0.014449 ...