71,479 questions
1
vote
0
answers
121
views
Why Datepart function rounding the millisecond portion of datetime column
I have a SQL Server table that has a datetime column. Its default value is provided by the GETDATE() function.
I want to select the millisecond portion of the value by using DATEPART() function. ...
0
votes
0
answers
45
views
Python: strftime, gmtime output not correct
I'm trying to convert epoch to human-readable date but it is apparently giving wrong output. Below is my code that I'm using and it outputs 51700-02-27 20:20:00. When I convert this epoch using the ...
0
votes
1
answer
63
views
Why difference between timestamps gives wrong time using Date()
I don't know why, but difference between two timestamps gives wrong time as a result. Any thoughts?
Timber.d("test delta, departed = $time1, plan = $time2")
...
0
votes
2
answers
245
views
Date/Time To Date Data Type In Power Query From SQL Direct Query
Lately I've been having an issue with Dates and Hierarchies in Power BI.
The main issue is that any SQL query I load via Direct Query (even when the date columns are date data types and not date/time ...
2
votes
2
answers
70
views
What Excel function can I use to calculate the length of a date time string?
I am trying to calculate the length of the date-time string in a cell
In Microsoft Excel I am using the LEN function to calculate the length of the date time string in cell C2.
The value in C2 is 2017-...
-1
votes
1
answer
46
views
Datetime keeps complaining about string format
The following lines
new_variable = dataset['Time'].units[14:].rstrip()
print ("NEW VARIABLE ", new_variable, type(new_variable), len(new_variable))
datetime_variable = datetime.datetime....
1
vote
1
answer
309
views
For timestamp with timezone, the internally stored value is always in UTC
According to the documentation, "for timestamp with time zone, the internally stored value is always in UTC (Universal Coordinated Time, traditionally known as Greenwich Mean Time, GMT). An input ...
-1
votes
2
answers
100
views
Getting unparsable date error in groovy script
I have below code snippet :
java.util.Calendar calendar = java.util.Calendar.getInstance();
curdate = "2025-01-31T12:27:00"
def parsedDate = new Date().parse("yyyy-MM-dd'T'HH:mm:ss&...
1
vote
4
answers
118
views
Calculate mean time of day in %H:%M:%S in R
I am trying to calculate the mean time of day a particular activity occurs per participant in a long dataframe. Each participant has 7 timepoints of data, and I need to calculate the mean time of day ...
0
votes
1
answer
49
views
How better reformat a date using PHP [duplicate]
We have code line:
$result = "{$list[ 'ga_event_start_date' ]} - {$list[ 'ga_event_end_date' ]}";
And the dates display as 'd M y'
We need to remove the 'y' numeral.
Can this be done in ...
1
vote
0
answers
101
views
Reading time variable in R from Excel with different formats
I have Excel sheets I want to analyze in R to examine elapsed time between each teacher and student turns. I am using this code to import data:
data_raw_all <- list.files(path ="coded_data&...
2
votes
1
answer
71
views
R calculate timestamp of earliest sequential prior message based on user ID of who sent message
I have a dataset of messages being sent between two people (user A and user B) on different chats over time. I need to figure out how to track the datetime of the last but earliest user A message ...
2
votes
2
answers
63
views
R calculate timestamp of last message based on user ID of who sent message
I have a dataset of messages being sent between two people (user A and user B) on different chats over time. I need to figure out how to track the datetime of the last, most recent user A message ...
1
vote
1
answer
150
views
Is there a way of generating 3 letters codes / abbreviations for time zones in python?
Obviously, printing now time, date and time zone is possible by using datetime and time module (one of many ways):
timezone_name = time.tzname[time.localtime().tm_isdst]
However I need to get 3 letter ...
0
votes
1
answer
115
views
How to subtract/add years/month intervals to a date (like MySQL INTERVAL expression)
Let's say I need to change a datetime object by adding or subtracting some months.
How to avoid the well known PHP month calculations?
$monthstoadd=-1;
//today is 2025-01-24
$date=new DateTime("...
0
votes
0
answers
22
views
How do I use a DateTime wrapper in a struct field being serialized for use in Diesel? [duplicate]
I'm attempting to use a wrapper around chrono::DateTime<Utc> in a struct that I'm using as a model for a database row. I am using a wrapper so that I can implement other traits on it. However, I ...
2
votes
1
answer
81
views
An optimized fit for data in the shape of a sigmoid curve
I have a data set of Datetime and Elevation (the below is the actual field data) that has a sigmoid shape and I'd like to fit a sigmoid curve to it, optimizing parameters for the best fit. That seems ...
0
votes
1
answer
151
views
Convert datetime with timezone
I'm trying to convert datetime (2017-04-21 19:13:33.000) to this format "yyyy-MM-dd'T'HH:mm:sszzz" (2024-02-05T09:20:00+08:00) with timezone.
I'm trying to create Article object for Google ...
1
vote
1
answer
335
views
Getting ISO 8601 datetime string from Instant on Android
I have a time represented in a Kotlin Instant.
I want to obtain the ISO 8601 datetime string for the local timezone on Android.
But I'm running into conflicts with two separate classes called TimeZone,...
1
vote
3
answers
132
views
Inserting three letter day-of-week into a string in a .bat file
I put together a script to download the NYT daily crossword to PDF on my computer to then push to a tablet, but would love to insert a three letter day-of-week string "MON, TUE, etc." to the ...
1
vote
1
answer
80
views
ORA-01861 Error When Trying to Create WHERE Date is 6 Months From Current Date
I have a date field CONTACT_DATE in a DATE format (2000-07-28 00:00:00.000). I want to add a WHERE clause to a query to return results where the CONTACT_DATE is within 6 months of the current date, as ...
0
votes
0
answers
23
views
Date functions: trying to get dates 6 months in advance with certain criteria
I need to track attendance and progress over 6 months, I have to schedule meetings monthly to check in with clients, I work part time Monday to Wednesday so the meetings have to be on these days. I am ...
0
votes
1
answer
265
views
could not be parsed: Unable to obtain OffsetDateTime from TemporalAccessor
I have this java code:
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;
import java.util.Date;
DateTimeFormatter DATE_TIME_FORMATTER
= DateTimeFormat....
1
vote
1
answer
85
views
How can I get an array of all overlapping date ranges across a given set?
I am using fullcalendar.io JS library to visualize the bookings on my rental company. I store the motorbikes as arrays of categories (engine sizes) with a children array containing all the motrobikes ...
0
votes
1
answer
259
views
PostgreSQL with DBeaver shows UTC date time greater than Europe/Moscow
Could please someone explain why PostgreSQL with DBeaver shows the same date-time value in UTC greater than in Europe/Moscow time zone?
My computer time zone is MSK or Europe/Moscow (UTC +03:00)
I run ...