71,376
questions
0
votes
0
answers
13
views
Stock Price Analysis/Prediction with LSTM Model, timestamp problem
I’m working on analyzing and predicting stock price data using an LSTM model, in python. Currently, I’m experimenting with mixing up the data from an Excel file to provide the model with some insight ...
0
votes
1
answer
50
views
DateTime object giving me an error when querying an API using JSON
I am using an instance of OpenTripPlanner(route mapping software) and querying its API using JSON. Below is the code:
headers = {
'Content-Type': 'application/json',
'OTPTimeout': '180000',
...
0
votes
0
answers
39
views
Is there a way to get the dates of the last N days, months, years in Python? [duplicate]
I would like to get the datetime objects for the last N days before today, each set to 0:00.
E.g., if today is November 18, 2024 and N = 3, then the expected result looks like:
24-11-17 0:00
24-11-16 ...
-1
votes
0
answers
51
views
Datetime not current in loop
I'm working on a script that and saves a timestamped file in a loop.
The first time around it works good. The problem is the times after the first file beeing saved, the loop will overwrite the first ...
-1
votes
1
answer
38
views
Using numpy to sort datetime lists
I'm reading in a text file whose output looks like this:
['XXXX_10 SATLIT 9.900 2024/319 12:22:00 2024/319 12:31:03 TR2 # SOH'
'XXXX_10 SATLIT 9.900 2024/319 12:22:...
0
votes
1
answer
26
views
DataView RowFilter date time with XML
I have xml feed as
<CalendarEvent>
<EventID>12667274</EventID>
<StartDate>14/11/2024</StartDate>
<StartTime>08:45</StartTime>
<EndDate>14/11/2024</...
0
votes
1
answer
59
views
How to get timeslots based on start date time and end date time?
I need help in preparing query which will provide me 30 minutes slots based on the start date time and end date time.
For e.g.
In my query in between clause i will provide start date as 2024-11-13 00:...
0
votes
1
answer
58
views
Convert the following measurement timestamps to uniform timestamp
I have a .csv file where many different properties are measured with 10 Hz frequency. The first row with the timestamps looks as follows:
0 NaN
1 29/07/2021 11:00
2 ...
1
vote
2
answers
38
views
In python (pytz), how can I add a "day" to a datetime in a DST-aware fashion? (Sometimes the result should be 23 or 25 hours in in the future)
I'm doing some datetime math in python with the pytz library (although I'm open to using other libraries if necessary). I have an iterator that needs to increase by one day for each iteration of the ...
0
votes
1
answer
25
views
use closing hours by default
Using this piece of the pytz script,
import dateutil
import pytz
utc = pytz.UTC
print(utc.localize(dateutil.parser.parse('2024-10-31')))
the output shows:
2024-10-31 00:00:00+00:00
We want to ...
-3
votes
2
answers
56
views
Set min value for End time using datetime-local input type depending on Start Time
I have a start date/time and end date/time field on a form, using type="datetime-local"
I'd like the End Date/Time MIN value to be set to the start Date/Time value.
I can set the min date ...
0
votes
1
answer
68
views
DateTIme.ToString returns different results in localhost and Azure
We have an ASP.NET Core 8 website:
We have set the culture to da-DK.
In C# code inside Startup it shows that the TimeSeparator is ':' and DateSeperator is '-'.
In an MVC view using System.Threading....
0
votes
1
answer
32
views
Google Annotation chart Invalid date, or date and time error
I am having problem in formatting the date column for Google Annotation chart. I am following this link https://developers.google.com/chart/interactive/docs/gallery/annotationchart
My Data for ...
2
votes
0
answers
19
views
How to Exclude Weekends in Prophet Model for Forex Data?
Question:
I'm working on a time series forecasting project using Prophet to predict foreign exchange (forex) rates, specifically USD to MXN. Since the forex market does not operate on weekends, I need ...
-3
votes
0
answers
63
views
PHP Negative millisecondstimestamps (<1970) and DateTime
1970-01-01T00:00:00.000+00:00 has an epoch timestamp of 0 and 000 milliseconds
1970-01-01T00:00:00.001+00:00 has an epoch timestamp of 0 and 001 milliseconds
So then:
1969-12-31T23:59:59.999+00:00 ...
-1
votes
2
answers
55
views
Convert strange Datetime format
In one of my MySQL 5.7 tables, I have column that has a strange datetime format. It looks like this:
2024-08-09 20:57:31.4477
I am trying to use this query to convert it to a date format m/d/Y. ...
1
vote
2
answers
57
views
How to get WooCommerce orders created from a given start date?
I need to get orders only if order was created from given date, let's say: 01/11/2024.
Then I would get order created from the day 01/11/2024 to the actual date (today).
I found this code which does ...
0
votes
2
answers
70
views
Converting WinCC Ticks to C# DateTime and vice versa
When you save the log files of Siemens WinCC Flexible as text files, you will have one field as Date and time, and another field as Ticks:
TimeString
Time_ms
"2024-03-16 00:38:20"
...
0
votes
1
answer
45
views
Issues with javascript dates /times on server vs local browser (react)
I have a set of code running that checks two dates. If those two dates/times occurred on the same day, one course of action is taken. If they are not, a different set of components are shown. The code ...
0
votes
1
answer
51
views
Why does my Django ORM query with naive datetimes return the same results as a PostgreSQL query with time zone-aware datetimes?
I'm using Django to filter reservations based on a date range with naive datetimes. My Django ORM query is:
start_d_date_naive = "2024-11-3 00:00"
end_d_date_naive = "2024-11-3 23:59&...
0
votes
2
answers
64
views
Date of First and Last Days of Current and Last Weeks
How to get the Date of First & Last days of Current Week and Last Week. Considering the Week start with Saturday and ends with Friday.
Here is my unsuccessful trial :
//Last Week
DateTime _startLw ...
0
votes
1
answer
37
views
Overplot data in time/date format and function in gnuplot
I use Gnuplot Version 5.4 patchlevel 6. I would like to plot as a function of time (in format "%d %b\n%H:%M:%S") a column in a .csv datafile
2022-02-16T21:22:28.285029000Z. 3.03665
2022-02-...
0
votes
0
answers
32
views
date and time column sorter in excel [duplicate]
I know its a dum question, but I have data in excel in a very stupid format, I have usage data where my columns are half hourly basis and rows are dates for 1 year.
I need to see the dates and the ...
0
votes
1
answer
54
views
8% of Date/Time Strings are converting with the wrong year and month, no clue why [closed]
I'm trying to calculate the duration between the start and end dates, which seems simple enough. The issue is that the formats are variable. I created some functions to clean the strings and handle ...
0
votes
1
answer
28
views
How to change timezone of datetime object using timezone abbreviation
I bet this is easy, but darned if I can figure it out. Standard disclaimer that
honestly, I've tried to figure this out.
How do you change the time zone of a datetime.datetime object by using the
...
-2
votes
2
answers
74
views
How to create a datetimeindex from integer date and time columns in Pandas
I have a dataframe with columns corresponding to days since 1/1/1900 (date) and seconds as part of a 24h day (time).
date time
0 40603 34222
1 40603 34223
2 40603 34224
3 40603 ...
0
votes
1
answer
41
views
Incorrect datetime value: ' ' for function str_to_date
In MySQL 5.7, I have a varchar column that has a string datetime that looks like this:
`2024-09-03 02:00:07`
I can run this query:
select date_format(str_to_date(`column1`, '%Y-%m-%d %H:%i:%s'), '%m/%...
1
vote
0
answers
49
views
java.lang.UnsupportedOperationException: Cannot project java.time.Instant to java.time.OffsetDateTime
In my spring application, I am fetching date from my PostgreSQL database.
The datatype of the date is created_at timestamp with time zone.
I have seen in the past and also mentioned in the ...
0
votes
1
answer
63
views
String To DateTime Error in Azure Data Factory [Type conversion settings]
I want to change my string with 28/10/2024 [dd/MM/yyyy] from .csv file to table in mssqldb and I already have mapped the columns with this picture: Mapped columns from csv to table
Problem is I was ...
-8
votes
0
answers
33
views
constructor of javascript Date for string [duplicate]
I have string like this, 2024-11-03T03:08:39.209797+09:00
Which is passed from python as json format.
Now I try to do this
var myDate = date("2024-11-03T03:08:39.209797+09:00")
However, it ...
-1
votes
1
answer
66
views
Pandas Datetime conversion CET/CEST to UTC
I have a df datetime column that I want to convert from Europe/Copenhgaen t.z to UTC but I just keep getting duplicate entries in the UTC column. The reason this happens is because of how I make my ...
1
vote
1
answer
52
views
How to get timezones for a country?
In my .NET 8 application, I currently use two libraries, TimeZoneNames and TimeZoneConverter. I see that TimeZoneNames is not actively maintained, and the author recommends using .NET 6+ built-in ...
0
votes
3
answers
53
views
SQL Time Intervals
RegistrationDate
2024-10-31 07:30:00.000
2024-10-31 07:50:00.000
2024-10-31 08:40:00.000
2024-10-31 09:30:00.000
2024-10-31 10:40:00.000
2024-10-31 11:30:00.000
2024-10-31 13:00:00.000
2024-10-...
0
votes
1
answer
91
views
check date input for complete date
I have the following code:
<input class="submit-form-on-change" type="month" name="@Model.DatePickerFormKey" value="@Model.InitialValue?.ToString("yyyy-MM&...
-1
votes
0
answers
29
views
rsyslog.conf: How to convert timereported to rsyslog server timezone?
I've configured rsyslog to print timereported in syslog message but by default it prints the timezone of the client. I've multiple clients with different timezones. Is there a way to setup rsyslog ...
0
votes
2
answers
68
views
Unable to extract timestamp from Date/Timestamp combo column in Excel 2016 [duplicate]
I'm trying to extract a timestamp from a date/timestamp data combo into a different column, but I'm getting random numbers. I've tried text-to-columns, LEFT, and RIGHT. Then, I special-pasted the ...
1
vote
0
answers
50
views
Doctrine 3 'default' => 'CURRENT_TIMESTAMP' not working
How to handle default datetime values in doctrine entities?
I'm working with the following code:
#[Entity]
#[Table(name: 'messages')]
class Message
{
#[Column(name: 'sent_at', type: Types::...
2
votes
2
answers
80
views
Could not write JSON: Java 8 date/time type `java.time.OffsetDateTime` not supported by default SpringBoot
I am getting error: Could not write JSON: Java 8 date/time type java.time.OffsetDateTime not supported by default: add Module "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" to ...
1
vote
1
answer
50
views
how to filter datetime by day in django with timezone utc aware?
The datetime objects I am trying to filter are 2024-10-26 00:49:34.131805 in the database, which is 9pm in my country. what happens is that when I am trying to filter by day (created_at__day=timezone....
1
vote
1
answer
40
views
How to fix wrongly ordered date axis in line chart
I am trying to build a line chart with a date axis to monitor the evolution of an indicator.
I built the data model with an auto date table, linked to the facts table through a date key. The model is ...
1
vote
1
answer
44
views
Will getTimezone() EVER return false when invoked on a PHP DateTime or DateTimeImmutable object?
In the docs it says that the function returns a DateTimeZone object on success or false on failure. My question is, in which cases will this result in a failure?
In my experience, it is never failing ...
0
votes
1
answer
33
views
EF Core parameterized DateTime format is invalid
I'm running a basic query using EF Core on SQL Server using a parameterized query where the query is:
SELECT COUNT(*)
FROM MyTable
WHERE Created >= @0
And my parameter is:
new DateTime(2024, 10, ...
-1
votes
1
answer
133
views
Formatting nullable DateTime
This is my function:
private static string strTimeStampMsg(string strMsg, DateTime? dtTimestamp = null) {
if (strMsg == null || strMsg.Length == 0) {
return string.Empty;
}
string ...
1
vote
2
answers
73
views
R, data.table and manually defined start of 24 hour intervals
please, give me a hint to solve the following problem:
DT[ , .N, by=date], with date is of class Date and format %F,
will give the number of rows by day.
DT[ , .N, by=format(DateTime, "%F")],...
-3
votes
0
answers
72
views
System.nanoTime()/1,000,000 is completely different from System.currentTimeMillis() [duplicate]
My program writes a value from System.nanoTime() to a database and is having trouble translating that value into a human readable date/time version.
Examples of values on different days: ...
0
votes
1
answer
48
views
Elasticsearch Datetime Mapping for localized zone-offset in Brackets
I have an index in Elasticsearch that needs to take datetime formats in the following variations:
08/23/2023 8:00:00 PM(UTC+0)
2023-08-23T20:00:00+0000
I can't get an Elasticsearch mapping for the ...
0
votes
2
answers
51
views
Need help to understand Date rollover logic
I am trying to understand the logic to rollback the date to previous month.
const now = new Date();
console.log(`Initial Date: ${now}`); // Initial Date: Wed Oct 23 2024 00:01:56 GMT-0500 (CST)
now....
0
votes
1
answer
63
views
Find dataframe row where a column's datetime value matches another column's datetime value and return a value from the matching row
I am trying to find the row where a column 'c2' datetime value matches another column 'c1' datetime value and return a value from the matching row 'rtn' as a 'new' value. It works with the following ...
0
votes
1
answer
21
views
Error in grouping datetime object values using 'groupby' and 'Grouper' in panda dataframe
I am facing anerror while trying to group a column containing dates on the basis of years.
I have converted the column to datetime object and tried groupby and Grouper method, but an facing the ...
-7
votes
1
answer
74
views
How to check if two unix timestamps are included in five minutes by using DateTime Class [closed]
How to check in PHP if 2 unix timestamps are in a range on 5 minutes by using DateTime Class?
I'm refering to five minutes of clock, not (5*60 secs). When exactly the minute passes looking at the ...