71,479 questions
Tooling
1
vote
3
replies
59
views
Python delta time series conversion to time data type
I have a column named ride_length that is the difference between two datetime columns. It has a data type of time delta series. How can I convert it into a time data type?
Current format 1 day 12:58:...
1
vote
1
answer
85
views
How to find corrupted date entry when date column type is (object) [closed]
I am trying to convert a column of time stamps that are currently of type object to proper datetime. When using pd.to_datetime() on the column I got this error
OutOfBoundsDatetime: Out of bounds ...
1
vote
1
answer
56
views
wrong results with DateTime/IntlDateFormatter on certain Dates
I try to introduce an alternative way to localize Date expressions using IntlDateFormatter with DateTime.
There is a strange behaviour depending on the day that I use. So I must have done an error in ...
0
votes
0
answers
52
views
VB Net WinForms Chart Zoom In with DateTime as X Axis
I am a newbie at VB.NET coding. I am currently trying to make a real time line chart in WinForms, but I am struggling with zooming in the chart. My chart has the range of random number generated by a ...
1
vote
1
answer
72
views
Calculations from Timestamp based on Checkbox Iterative now() in Google Sheets
I don't want to use Google Apps Scripts, just formulas so that this can be display/edited on a mobile device while offline.
[![In column B, I want to put timestamps when a checkbox in Column D becomes ...
-1
votes
1
answer
97
views
ParseExact Exception [closed]
I have power shell code which extracts a date from a different source and converts it:
$dtStart = [DateTime]::ParseExact($StartDate.toString().Substring(0, 10).Trim(), 'M/d/yyyy', $null).ToString('dd/...
1
vote
1
answer
83
views
Polars parse multiple datetime format [duplicate]
I have string column in polars dataframe with multiple datetime formats and I am using following code to convert datatype of column from string into datetime.
import polars as pl
df = pl.from_dict({'...
2
votes
1
answer
133
views
Problem converting a column to datetime format
I have a data frame and I am trying to convert the time column into a datetime format. The first step I did was:
data['time'] = data.time
data['time']=pd.to_datetime(data['time'], format='%H:%M:%S.%f')...
2
votes
4
answers
228
views
Flag rows if the time in a column falls within a specified window of another column
I have a dataframe where each row represents a detection of a fish. The fish can be either, Brown Trout (Fish.ID starts with TB_) or Salmon/Parr (Fish.ID starts with TA_). I want to create a new ...
1
vote
1
answer
119
views
Different epoch time from the same datetime
Here is my code:
import pandas as pd
import datetime
df = pd.DataFrame({'str_date': ['2023091004']})
df['epoch'] = pd.to_datetime(df['str_date'], format='%Y%m%d%H').astype(int) // 10**9
dt = ...
1
vote
1
answer
44
views
TypeError: can't compare datetime.datetime to str when filtering data in Python [duplicate]
I have a list of records where each item has a date field. I'm trying to filter the records based on a given date:
from datetime import datetime
records = [
{"name": "John", &...
-3
votes
2
answers
194
views
String not recognized as a valid DateTime
I'm receiving this date and time in US format from an upstream server I have no control over and can't change: 12/16/2024 11:30:23 AM
I am trying to convert it to UK format using PowerShell:
[DateTime]...
4
votes
1
answer
138
views
Python datetime and timedelta behaviour over Daylight savings time change
I encountered this behaviour and I figured I would ask the correct way to go about it.
Here is a toy example:
pre_timechange = datetime.datetime(2025, 11, 2, 1, 59, 9, tzinfo=zoneinfo.ZoneInfo(key='...
0
votes
2
answers
79
views
How to send a literal time to a Salesforce Time field from DataWeave without timezone conversion?
I'm using MuleSoft to send data to a Salesforce custom object. My object has a field named Shift_End_Time__c, and its data type is Time.
My source system provides this time as a string in UTC format, ...
-2
votes
1
answer
66
views
Timedelta Unit Argument as a Variable [duplicate]
Is it possible to have the units argument for the timedelta function be defined by a variable?
To elaborate, is this possible?
Time_Unit = "days"
Time_Increment = 1
Time2 = Time1 + ...
3
votes
0
answers
146
views
How to convert epoch to datetime in Datadog dashboard?
I have a Datadog dashboard displaying the metrics we get for our AWS Glue Zero-ETL integrations. One of those is lastSyncTimestamp, the epoch timestamp until which source has been synced to target.
I ...
4
votes
2
answers
123
views
Django difference between aware datetimes across DST [duplicate]
I'm working on a Django application in which I need to calculate the difference between timestamps stored in the DB. This week I run into some problems related to DST.
In particular in the following ...
3
votes
1
answer
76
views
Explicit formatting of Format date/time regardless of operating system setting
As an an example:
print(os.date("%b"))
This prints "Oct" when running on a computer having date time settings set to English.
When using other language it prints "okt" (...
0
votes
1
answer
127
views
How can I retrieve data between certain times?
My data decoded from a radio receiver is stored in tables Flights and Aircraft with a common field AircraftID to enable a JOIN. There are fields for when the radio signal starts and ends (StartTime ...
0
votes
1
answer
75
views
Date & time not being shown in japanese
I am using IBM MQ on a Windows 11 machine that was originally installed with the Japanese language pack—in other words, unlike the typical en-US installation, mine came with Japanese as the default. ...
0
votes
1
answer
110
views
Combining two dataframes and keeping the average
I'm new to coding, and I'm trying to combine the data from two weather stations into one new dataframe sorted by Datetime. I want this new dataframe to contain the average values of the two original ...
1
vote
1
answer
147
views
Pandas's to_datetime function and datetime format
I have a .csv file with two columns (Date and Time). The time zone is "Europe/Paris" with a +02:00 hours shift. The file is structured in 2 parts with two datetime formats.
Date
Time
08-11-...
3
votes
1
answer
143
views
GraalVM native-image localized data/time data
Given this sample:
final var ARABIC_GREGORIAN_DATE_FORMATTER = DateTimeFormatter.ofPattern("EEEE dd\\MM\\yyyy G").localizedBy(Locale.forLanguageTag("ar"));
final var ...
1
vote
2
answers
112
views
How do I calculate a relative time delta in Pandas?
I have a column of datetimes and I want to get the difference between values in terms of years, months, etc, instead of timedeltas that only provide days. How do I do this in Pandas?
Pandas provides ...
3
votes
3
answers
162
views
Calculating monthly revenue given start and end date for each ID using Polars
I have a dataframe using this format
import polars as pl
df = pl.from_repr("""
┌─────┬────────────┬────────────┬──────────┐
│ ID ┆ DATE_PREV ┆ DATE ┆ REV_DIFF │
│ --- ┆ --- ...
0
votes
1
answer
59
views
Vaadin 24 Datetimepicker in one field
Is it possible to display the date and time selection field in one field instead of two?
How can I get a separate calendar and time selection component (only what is raised by clicking on the field)?
...
-2
votes
1
answer
157
views
How to display local time from a UTC time [closed]
I have some data with date time in UTC. My local time is usually 5 or 6 hours behind depending on standard or daylight time. I would like to print the local time.
Is there an easy way to do that in ...
1
vote
0
answers
38
views
Django timestamp__date filtering works locally but returns extra rows in production?
I have a Django API that returns self signedup users in a given date range. The AuditLog model stores timestamp with DateTimeField(default=timezone.now) and USE_TZ=True.
Locally, the date filter works ...
0
votes
2
answers
87
views
How to get the current UTC date in Python as a type of datetime.datetime
I would like to use the Python standard library datetime to assign to a variable the current date, in UTC and having it of type datetime.datetime.
i.e. datetime.datetime(2025, 9, 23, 0, 0, tzinfo=...
2
votes
1
answer
56
views
Python: Converting string in NZ summer time to UTC gives wrong result
I am creating a simple script where I need to convert
strings with date and time given in NZ time to corresponding
UTC time.
The time series are done in NZ summer (Dec-Feb) and hence the
NZ time is 13 ...
2
votes
1
answer
101
views
Why does ngbDate picker Month & Date selection not come in Angular version 20?
I'm using Angular version 20. Month and year selection are missing. I have tried more methods, however I am still facing issues.
Imports:
CommonModule, FormsModule, ReactiveFormsModule, ...
2
votes
1
answer
57
views
Multiple Data Entry in Django ORM
I have been trying to create a way that my Django database will store data for 7 consecutive days because I want to use it to plot a weekly graph but the problem now is that Django doesn't have a ...
2
votes
1
answer
204
views
Memory efficient sorting/removing duplicates of polars dataframes
I am trying to import very large csv files into parquet files using polars. I stream data, use lazy dataframes and sinks. No problem until...
...sorting the dataframe on a column and removing ...
0
votes
1
answer
119
views
MuleSoft DataWeave Date Time Formatting
Using input payload of
{
"Date": "2025-09-09T18:03:06.830"
}
I'm trying to get an output of
"2025-09-09T18:03:06.830Z"
I've tried this DataWeave
%dw 2.0
output ...
1
vote
0
answers
34
views
Laravel 12: Run scheduled command at 07:00 UK time while server is on UTC
I’m using Laravel 12 and I want to run a scheduled command every day at 07:00 UK (Europe/London) time, but my server is configured with UTC timezone.
In my bootstrap/app.php I have and its working:
$...
2
votes
1
answer
156
views
Gregorian Calendar gets the wrong "start of the week"
This is August 2025:
August 2025
Mon Tue Wed Thu Fri Sat Sun
1 2 3
4 5 6 7 8 9 10
--> 11 12 13 14 15 (16) 17
18 19 ...
4
votes
1
answer
549
views
Python 3.13.5 sqlite3 DeprecationWarning persists despite registering custom date adapter
I am building an application using Python 3.13.5 and the native sqlite3 library. To correctly handle datetime.date objects and avoid the new DeprecationWarning, I am trying to implement the officially ...
2
votes
1
answer
54
views
Split CarbonPeriod into days (PHP)
I have this CarbonPeriod with start 2025-06-09 19:00 and end 2025-06-11 11:00. What I want is an array of the days with start and end date. So basicly an array like this, possibly with new ...
7
votes
2
answers
183
views
How to convert std::chrono::system_clock::now() to boost::mysql::datetime::time_point
I'm using the boost mysql library in a project. I need to use boost::mysql::datetime (datetime) to represent timestamps. A datetime value can be constructed from a boost::mysql::datetime::time_point.
...
1
vote
1
answer
69
views
Blazor EditForm: Query parameters not binding to DateTime inputs on navigation
I can't get the check-in and check-out dates I entered on the form. When I enter the values and submit, I see the default values I assigned at the beginning(Datetime.Now and the next day), and I don'...
2
votes
1
answer
158
views
What is NaT in Pandas?
I have a dataframe with some "NaT" values in a datetime column. What does that mean?
project status completed
0 windows done 2025-08-20
1 doors done 2025-08-21
2 hvac ...
1
vote
2
answers
133
views
Conversion of (Excel) number to datetime [duplicate]
I have an Excel file with a datetime column and values like:
02.12.2024 18:02:05
I'm reading this file into R with openxlsx::read.xlsx, which fails to recognize this column as datetime, even if I ...
2
votes
0
answers
81
views
how to implement a ConversionService from LocalDateTime to String in spring boot
I have a spring boot webapp, which uses thymeleaf for html templating and as templating engine for emails sent by this webapp, too. In my email I want to use a LocalDateTime, which does not work.
...
2
votes
1
answer
72
views
Difference in rounding between .NET 6 and .NET 8?
I'm having trouble understanding why the same code is producing different results between .NET 6 and .NET 8 environments.
Specifically, I'm trying to understand why 'end' is not equal to 'newEnd'.
...
4
votes
1
answer
230
views
How to compare datetime.now() with sunrise/sunset times from Sunrise-Sunset API in Python?
I'm working on a Python script that checks whether it's currently dark outside based on my location (Barishal, Bangladesh). I use the Sunrise-Sunset API to get sunrise and sunset times, and then ...
0
votes
0
answers
81
views
Specify the time zone, not the offset, when creating a DATETIMEOFFSET value
Is it possible to specify the time zone rather than the offset when creating a DATETIMEOFFSET value from a string?
I know I can create a
DATETIMEOFFSET from a string which includes the time zone ...
1
vote
0
answers
454
views
Polars schema_override for Datetimes as string
Issue
I have data in form of a list of dicts (see MRE below). To make everything type strict I would always like to pass in the expected schema (dtypes) when I read in this data. This option is given ...
0
votes
1
answer
64
views
How to show both calendar and type-in time input in one modal using react-native-modal-datetime-picker?
I'm using the react-native-modal-datetime-picker package in my React Native project and want to display a single modal that contains both:
A calendar to select the date
A text input (not a clock ...
0
votes
2
answers
91
views
False output with datetime week and isocalendar() [closed]
I have this GUI with the button "get dates for last week".
I programmed this in 2024, using datetime objects and the isocalendar() method - and the button worked like a charm, returning the ...
1
vote
1
answer
99
views
How to get a billing cycle period between the 26th of the previous month and the 25th of the current month using Python (timezone-aware)?
The Problem
I'm building a billing system in Django, and I need to calculate the billing period for each invoice.
Our business rule is simple:
The billing cycle starts on the 26th of the previous ...