1,682 questions
-4
votes
1
answer
62
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 = [
{
&...
0
votes
1
answer
63
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 ...
3
votes
3
answers
151
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 ...
0
votes
1
answer
68
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) ...
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
2
answers
78
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 ...
2
votes
2
answers
73
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 ...
-2
votes
2
answers
79
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....
-1
votes
1
answer
113
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
146
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 ...
-1
votes
2
answers
129
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
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
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 ...
-3
votes
1
answer
174
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
50
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 ...
0
votes
1
answer
133
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,...
-2
votes
2
answers
720
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 ...
0
votes
2
answers
76
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' => '...
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), ...
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 ...
1
vote
2
answers
757
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
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 ...
1
vote
1
answer
270
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 ...
-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 ...
2
votes
2
answers
122
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 ...