All Questions
77,684 questions
0
votes
0
answers
12
views
Apache IoTDB date_bin fails with "mismatched input" for 1mo 1d interval
I'm trying to analyze server CPU metrics using a custom billing cycle that doesn't align with calendar months. Our billing department defines each period as "one full month plus one extra day&...
0
votes
1
answer
104
views
Why is the current date being changed on the result set of cursor inside procedure?
I need help with an issue regarding date returns in a CURSOR in DB2 for LUW.
The Dt_Noformat field returns an incorrect date, while the Dt_Format field returns the date correctly.
This problem occurs ...
1
vote
2
answers
171
views
Difference between dates in SAS doesn't match results
I need to recreate the code from SAS in R but I'm struggling to get the same results. I can get some rows to be the same but at the same time some other rows are different.
Can anyone help with ...
2
votes
1
answer
107
views
Why does entering date via InputBox swap the day and month?
I'm trying to allow a user to input date into a cell using an InputBox. I'm using dd/M/yyyy format. However, every time InputBox receives a date that could swap the day and month, it does.
E.g. 3/2/...
1
vote
1
answer
129
views
Calculate how many days passed since the last played match for each team
I am trying to create two columns in my dataframe, with the days passed since the last match played from both the home team and the away team.
This is what my dataframe looks like:
Date ...
0
votes
1
answer
70
views
SwiftUI Date.FormatStyle doesn't work with alternate Calendars
I'm trying to get SwiftUI to format dates in two different calendars using Date.FormatStyle, but I can't get it to work. What am I missing? Here's a minimal example:
import SwiftUI
struct ContentView:...
-4
votes
1
answer
84
views
Matching on dates when a MM/DD combination needs to be excluded [closed]
I've been tasked to write a query where a month and date combination from one column needs to not equal another date column.
i.e. MED_EFF_DATE = 06/01/XXXX and MED_CANC_DT NOT EQUAL 08/29/XXXX
I've ...
-1
votes
0
answers
59
views
SQL Developer not selecting correct date format on import
I have to import quite a bit of documents into SQL Developer, but for some reason it is unable to read the date on multiple columns and I have to go in and manually select the correct date format. ...
1
vote
2
answers
162
views
Get next n dates based on pattern from time diff
I have a vector of dates where I want to get the next n (any integer) dates.
dates <- structure(c(18946L, 18947L, 18948L, 18949L, 18950L, 18951L, 18953L,
18954L, 18955L, 18956L, 18957L, 18958L, ...
5
votes
1
answer
210
views
How to get Monday and Friday's date in C++ with date.h
With Howard Hinnant's date.h (I am using C++17), how can I get Monday's date and Friday's date using the library?
I can get today's date using this:
auto todayDate = date::floor<date::days>(std::...
0
votes
0
answers
89
views
Filtering based on date and time (POSIXct) in R (based on sunset and sunrise data) [duplicate]
I am trying to filter files based on the POSIXct format in R using tidyverse synthax.
What I need is to select all files that are within a timeframe between sunset and next sunrise for each day.
I ...
0
votes
1
answer
55
views
SAS Date formats mmddyy8
Need a SAS date in mmddyy8. format running Windows 11 Enterprise on PC SAS 9.4.
Code below, does in fact, derive the first date ("Q_start") of the month of the current quarter of the ...
Advice
2
votes
2
replies
175
views
Please help me understand why "in" and "of" are differ for DateTime strings
Please help me understand why "in" and "of" are so drastically different for DateTime when using a string to find a date.
This works:
$LastSunday = new \DateTime('last Sunday ...
Best practices
0
votes
4
replies
79
views
Is there a more efficient or elgant way to get a DateTime object from a relative string?
I need two DateTime objects to pass to a method. I'm not all that familiar with the class. After some head scratching and web searching, I have a working solution, but I don't like it.
Currently, I'm ...
0
votes
1
answer
84
views
Delete records from last day (switch midnight)
At the moment I delete records like this:
DELETE FROM users WHERE DATE_SUB(CURDATE(),INTERVAL 1 DAY)>=last_login
last_login = DATETIME field
This deletes records after 24 hours but it should ...