Skip to main content
Filter by
Sorted by
Tagged with
-2 votes
0 answers
67 views

I am trying to get a year, and time in UTC format for a particular time I am able to print the time in the desired format but it is always printing wrong year , not sure if it prints the correct time ...
Kapil's user avatar
  • 325
-3 votes
2 answers
153 views

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]...
Joly's user avatar
  • 3,326
0 votes
1 answer
60 views

Hi I am new to learning data science and was just trying to play with a data set: When I check the dtype of a column it shows as object. I want to convert it to a string so I can strip the components ...
Hamza Rehan's user avatar
1 vote
1 answer
104 views

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 = ...
user1700890's user avatar
  • 7,824
3605 votes
72 answers
7.0m views

How do I format a Javascript Date object as a string? (Preferable format: 10-Aug-2010)
leora's user avatar
  • 198k
0 votes
2 answers
66 views

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, ...
Kunal Awasthi's user avatar
-2 votes
1 answer
60 views

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 + ...
Jon S's user avatar
  • 55
4 votes
2 answers
108 views

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 ...
Luca Zanetti's user avatar
3 votes
1 answer
66 views

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" (...
Per Ljung's user avatar
2857 votes
48 answers
3.6m views

Can someone suggest a way to compare the values of two dates greater than, less than, and not in the past using JavaScript? The values will be coming from text boxes.
Alex's user avatar
  • 40.6k
3216 votes
40 answers
1.2m views

Would you recommend using a datetime or a timestamp field, and why (using MySQL)? I'm working with PHP on the server side.
Gad's user avatar
  • 42.4k
2223 votes
47 answers
3.9m views

SELECT GETDATE() Returns: 2008-09-22 15:24:13.790 I want that date part without the time part: 2008-09-22 00:00:00.000 How can I get that?
Eddie Groves's user avatar
  • 35.1k
3000 votes
26 answers
4.7m views

I have a huge list of datetime strings like the following ["Jun 1 2005 1:33PM", "Aug 28 1999 12:00AM"] How do I convert them into datetime objects?
Oli's user avatar
  • 241k
0 votes
1 answer
104 views

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 ...
Maurice Verest's user avatar
1 vote
2 answers
101 views

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 ...
wjandrea's user avatar
  • 33.8k
1655 votes
42 answers
206k views

Given a specific DateTime value, how do I display relative time, like: 2 hours ago 3 days ago a month ago
1318 votes
25 answers
1.7m views

Say I have an array of a few objects: var array = [{id: 1, date: Mar 12 2012 10:00:00 AM}, {id: 2, date: Mar 8 2012 08:00:00 AM}]; How can I sort this array by the date element in order from the date ...
ryandlf's user avatar
  • 28.7k
2 votes
1 answer
138 views

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 ...
wjandrea's user avatar
  • 33.8k
1061 votes
14 answers
1.9m views

Is there a nicer way than the following to return today's date in the YYYY-MM-DD format? str(datetime.datetime.today()).split()[0]
Pyderman's user avatar
  • 16.5k
936 votes
31 answers
1.5m views

I want to find out the following: given a date (datetime object), what is the corresponding day of the week? For instance, Sunday is the first day, Monday: second day.. and so on And then if the ...
frazman's user avatar
  • 33.5k
7 votes
2 answers
177 views

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. ...
pacmaninbw's user avatar
1160 votes
20 answers
1.8m views

I have a string representing a unix timestamp (i.e. "1284101485") in Python, and I'd like to convert it to a readable date. When I use time.strftime, I get a TypeError: >>>import ...
VeryNewToPython's user avatar
629 votes
50 answers
830k views

I am using the datetime Python module. I am looking to calculate the date 6 months from the current date. Could someone give me a little help doing this? The reason I want to generate a date 6 ...
RailsSon's user avatar
  • 20.7k
626 votes
37 answers
1.3m views

I need to remove time portion of date time or probably have the date in following format in object form not in the form of string. 06/26/2009 00:00:00:000 I can not use any string conversion methods ...
im useless's user avatar
  • 7,481
1016 votes
25 answers
962k views

There is this example code, but then it starts talking about millisecond / nanosecond problems. The same question is on MSDN, Seconds since the Unix epoch in C#. This is what I've got so far: ...
Mark Ingram's user avatar
  • 74.1k

1
2 3 4 5
1430