558 questions
4
votes
1
answer
144
views
How to get a JavaScript "days since 2000" that is identical to that of Scratch's block of the same name?
What do I need to do to make a "days since 2000" JS function that provides a value identical to that provided by the reporter in Scratch?:
The Scratch Wiki page states that
It reports the ...
-1
votes
2
answers
99
views
Check consecutive days in SQL
I have a dataset structured as follows which contains thousands of materials and millions of rows:
Material
Date
Stock
Demand
Supply
Projected Stock
Target Stock
Overstock
123456
24/06/2024
60
0
0
60
...
0
votes
1
answer
43
views
Oracle SQL difference in days between two dates with different formats - SYSDATE and a VARCHAR2
I am trying to find the difference in days between a VARCHAR2 value (context sensitive) in format YYYY-MM-DD HH24:MI:SS and SYSDATE.
If I use in select
TO_DATE(peevf.screen_entry_value,'YYYY-MM-DD ...
0
votes
2
answers
76
views
calendR - options to display conflicting events on the same day?
Using CalendR to plot fishing days for boats. On Tuesday 02 January two boats share a fishing date, however the day is shaded green for Marlin, and you are not able to see that Fish Tales went fishing ...
0
votes
1
answer
47
views
Return rows with last updated date for different days
Assume this is my PySpark dataframe, ordered by ("ID", "updated_at"):
ID
updated_at
stock_date
row_num
a1
2024-03-25T20:52:36
2024-03-25
1
a1
2024-03-26T11:23:48
2024-03-26
2
a1
...
0
votes
1
answer
35
views
Dates in R: Counting Instances and Number of Days
I am working with water quality data in which I have sampling location, the dates of the samples taken and the result of each sample. Whenever a sample result is greater than 104, it triggers an ...
3
votes
1
answer
195
views
How do I change start date of 'week()' to Monday instead of Sunday in altair?
I am relatively new to coding and altair, and I am currently struggling to change the start date of 'week()' to begin on Monday instead of Sunday. As a distance runner, I track my weekly mileage from ...
0
votes
1
answer
189
views
EXCEL- Trying to count specific dates between two but also in specicif Years. Excluding the days before or after the dates asked
I've been looking and searching for this for way too long. I made some dates and added some for tests which I will share.
I'm trying to count days between two dates, leaving it blank if a cell is ...
0
votes
0
answers
61
views
Add a count of Business Days column when run. Counting Date in table to today
SELECT
FullDate,
DATEDIFF(dd, Fulldate, @Today)
FROM
(SELECT
[DateKey],
[FullDate],
[DayOfWeekName],
[DayOfWeekAbbreviation],
[IsWeekday],
...
0
votes
0
answers
776
views
Convert months (in decimal form) to months and days that were found between two dates
UPDATE - My initial question has been answered. Follow up question at the bottom.
I'm trying to find the days, months, weeks, years between two dates (today and list of birthdays).
I couldn't find the ...
0
votes
0
answers
62
views
Converting values into proper dates [duplicate]
Using Python3, I have the following for loop that outputs a year followed by a day number as one figure. I want to be able to be able to convert this into a proper date. Please see below the code ...
0
votes
1
answer
48
views
SQL MAX clause for calculation of days
I'm going to post some SQL rows:
AND (CDCLI NOT IN (SELECT CDCLI FROM ANCLI07L1)
OR CDCLI IN (SELECT CDCLI FROM ANCL07L1
WHERE Days(TIMESTAMP_FORMAT(CHAR($TODAY), 'YYYYMMDD'))
- Days(...
0
votes
2
answers
415
views
Between _add_months configurastion
I have a report in which I'm using a filter on vehicle Wholesale date (calendar measure) trying to bring in the previous months date of transactions.
For example: Today is 8/10/23. I am wanting to see ...
1
vote
4
answers
1k
views
Get localized short names of days of week from monday to sunday in JavaScript
How can I get localized short names of the days of the week, starting from monday to sunday, in JavaScript?
0
votes
3
answers
82
views
Using a circular list in R to calculate days in a delivery period
Creating a circular list in R
I am working with a delivery schedule where I need to calculate the days in each unique delivery period. I was trying to solve my related issue in excel originally, but ...
0
votes
5
answers
109
views
I am trying to figure out how to calculate days between two events
I have a list of events. Every case (case ID) will eventually go through the events( event A, Event B). I have columns containing time stamps for the respective events. I am trying to find the days ...
0
votes
1
answer
79
views
How can I get the average number of days between changes in a variable over a period of time in R?
I have a dataset that has date and another variable (bank rate). Here is a snippet of the data:
I want to calculate the average number of days between each consecutive change in Bank rate. For ...
1
vote
3
answers
838
views
Create a Pandas Dataframe Date Column to Day of Year
I know this should be easy but for some reason, I cannot get the result that I need. I have data that looks like this where 'raw_time' is read into a df in the date format yyyy-mm-dd hh:mm:ss.
It ...
1
vote
3
answers
630
views
How to spread month to day with amount value divided by total days per month
I have data with an amount of 1 month and want to change it to 30 days.
if 1 month the amount is 20000 then per day is 666.67
The following are sample data and results:
Account
Project
Date
Segment
...
0
votes
1
answer
47
views
Get mean every n days of a month
Let's say I have this dataframe df
day
time
temperature
2022/01/01
00:00:00
23
2022/01/01
06:00:00
14
2022/01/01
12:00:00
21
2022/01/01
18:00:00
13
2022/02/01
00:00:00
25
2022/02/01
06:00:00
23
2022/...
0
votes
1
answer
76
views
Having trouble with a function in C
In my program, I am asking the user to input a date (in just integers such as 12 31 2019 367) and the number of days they add to it. In one of my functions, this is precisely what I am doing.
The user ...
-1
votes
2
answers
140
views
Problem of calculating the days between two dates in c++ using class of Date when the first date is bigger than second date
when the first date is bigger than the second, it doesent calculate.
for example: first date 22/10/2022
second date: 15/10/2022
#include <iostream>
#include <cstdlib>
using namespace std;
...
0
votes
1
answer
513
views
how to make calculation of days based on 2 dates using angular12
i am using angular12, here calculation of days based on 2 dates works fine with chrome, but the same thing fails in firefox.
TS:
Using Moment, gives invalid date error under firefox:
getDaysCount(...
0
votes
2
answers
39
views
How to compare twoTimestamps in Laravel?
Hello i want to compare dates in laravel
please tell me this code is right.
I want to check it before login.
When user is registered, user must be deactivated
Admin must activate the user: end_date=...
1
vote
3
answers
2k
views
Show only days in react date picker
I want to custumize my DatePicker and only show days cause i want the user to choose one or multiple day from 1 to 31 with ignoring the month and the year
I am using the date picker from "react-...
-5
votes
1
answer
64
views
could anyone identify the days python?
ask the user enter the date in the format YYYY-MM-DD
1.what age of user in days;
2.what day of week (in German language) was the birth.
import datetime
b = int(input('Enter your birthdate: '))
bb = ...
0
votes
1
answer
118
views
how to schedule task with python using Schedule?
Right now i am trying to do a reminder in python with scheduler. I used the schedule.every().tuesday.at("21:35").do(reminder) method but i want users to input the day and time instead of ...
-1
votes
1
answer
123
views
how to convert date in dd/mm/yyyy to days in python csv
i will like to covert dates to days
Example 01/01/2001 should be Day 1, 02/01/2001 should be Day 2
I have tried
prices_df['01/01/2001'] = prices_df['days'].dt.days
0
votes
1
answer
86
views
R:Counting entire active days from multiple start and end point of periods
I'm struggling with this.
My data have start/end points of each active period.
I'd like to calculate the number of active days.
My data are like this:
data <- data.frame(
"ID" = c("A&...
0
votes
4
answers
115
views
Convert arrays of active days to readable string
I need to convert an array of boolean values indicating whether the store is open on a given day.
For example:
Case 1:
Input data: [true, true, true, true, true, true, true]
Expected output: Every day
...
0
votes
3
answers
574
views
Get last 7 days by names javascript
How to get the last seven days, from today, (by names) in java script.
like if today is Wednesday, I want to get it like (Wednesday, Tuesday, Monday, Sunday, Saturday, Friday, Thursday, Wednesday).
0
votes
2
answers
128
views
Count bizdays that intersect between lubridate intervals in R
I have a dataset with ~ 330 000 rows. Each observation represents a period where an individual recieved a welfare benefit called "care allowance". The benefit is meant to replace income when ...
0
votes
1
answer
1k
views
How to get correct end date when adding 90 days to current date selected in datepicker (month updates incorrectly)
Goal:
add 90 days to current date selected in datepicker
Description:
I want to create a simple date calculation where a user selects from a date in a datepicker and the system automatically adds 90 ...
0
votes
2
answers
80
views
Get WorkDates by Monthdate javascript
I wonder if it is possible to get the workdays(mon-fri) by month and year.
The input is a month + year the output a list of dates.
For example: I give Month 1 and year 2020. I want to get: mon 01-01, ...
2
votes
5
answers
10k
views
Calculate the number of days between two dates in C – Convert date to days
Recently, I found myself in the need to know the number of days separating two dates for a little program I was writing in C.
I searched online for a solution but found nothing for C.
How could I do ...
0
votes
1
answer
198
views
Resample months to days in PySpark
I've got a DataFrame like this:
+-------------------+-----------+-------------+
| months| type|summaoborotdt|
+-------------------+-----------+-------------+
|2022-01-01 00:00:00| ...
1
vote
1
answer
79
views
How to change days of week in dataframe to English
I would like to change days of the week from Dutch to English, however,
Sys.getlocale (category = "LC_ALL") and Sys.setlocale (category = "LC_ALL", locale = "English United ...
1
vote
2
answers
477
views
Issue networkdays value in google spreadsheet
I have created the formula = NETWORKDAYS.INTL(E84,F84) and E84 and F84 are same date -> 2022.9.5. if it is the same date in both columns, it shows the value 1 but it shows the value 0.
It worked ...
0
votes
1
answer
95
views
Split month days onto multiple row once that row meet a limit (say each bucket limit is 90)
Sample Data:
date1
date2
fiscal mon
days diff
22-10-21
29-10-21
Oct21
8
30-10-21
26-11-21
Nov21
28
27-11-21
24-12-21
Dec21
28
25-12-21
28-01-22
Jan22
35
29-01-22
25-02-22
Feb22
28
26-02-22
25-03-22
...
0
votes
1
answer
136
views
How to calculate days between two dates from different sheets where the emails from both sheets in row match?
I have 2 sheets in same workbook that have dates that I need to calculate the number of days between the two dates. There is a common identifier in both sheets rows being email. If there is 0 days ...
0
votes
2
answers
130
views
Determine Patient Days for a set month SQL
I have written a query that will return total patient days. However what I need is to return patient days for the precious month. I am using the latest version of SQL and have read only access to ...
0
votes
1
answer
209
views
Date range offset
I want to generate a array's date offset
for e.g:
input :
dayjs()
Output :
["16/08/2022","23/08/2022","30/08/2022","6/09/2022"]
as you can see dates are ...
0
votes
1
answer
33
views
Add an option on a getDuration function
I actually search how can I add an option to have days in extra to my code. If someone can help I will be very very granted !
const portionTime = durationInSeconds => {
let hours = ...
0
votes
0
answers
154
views
Android Calendar doesn't add Day
val dayCalendar = Calendar.getInstance()
dayCalendar.time = entryDateC.time
for (day in 1..howManyDays) {
dayCalendar.add(Calendar.DAY_OF_MONTH, 1)
if (!disabledDays.contains(...
3
votes
2
answers
2k
views
How to count number of days for every month in a date range
I have data as below
+-----+------------+-------------+
| TYPE|DTIN_DATE |DTOUT_DATE |
+-----+------------+-------------+
| A| 2021-03-22| 2021-05-26|
| B| 2021-03-30| 2021-04-09|
+----...
0
votes
1
answer
595
views
python check user input is day of the week
I am attempting to define a function that asks the user which days of the week they are available. I need their input to be saved into a list for future use. I want to ensure they are entering the day ...
1
vote
3
answers
2k
views
How to get week days during period of time in flutter
I am creating an app that includes subscription. Now if the customer places an order from today's date to some period of time, I have to calculate total amount (which would be different for everyday)....
0
votes
1
answer
156
views
getting date from user in pickupdate var and want to add 3 days and store date in variable expiry date but its adding days in system current date
String pickupdate = pdate.getText().toString().trim();
SimpleDateFormat sdf = new SimpleDateFormat("MM-dd-yyyy");
Calendar c = Calendar.getInstance();
try {
c.setTime(sdf.parse(...
1
vote
0
answers
33
views
addin days in provided date by user
String pickupdate = pdate.getText().toString().trim();
// String dateBefore = "25/10/2022";
// create instance of the SimpleDateFormat that matches the given date
...
0
votes
1
answer
72
views
Calculating multiple for an input in a stranded time period dataset
Original table (or Dataframe)
ID
Start
End
1
2020-09-01
2021-12-31
2
2019-07-01
2021-07-31
...
...
...
1000
2015-01-01
2016-03-31
Desired table
ID
Start
End
Start_y
End_y
List
Day for calculation
Days
...