Questions tagged [string-to-datetime]
217 questions
0
votes
1 answer
Convert uncommon String date/time data to DateTime data type
I'm trying to implement a PowerShell script to compare DateTime from certificate file(Jave Keystore).
However, the DateTime format that I extract from keystore file is quite complex as example below.
Mon Mar 13 06:40:26 CDT 2023
Sat Sep 18 20:41:47…

Mek
- 35
- 6
0
votes
2 answers
How do you convert a column containing year & quarter in a str format as '1947q1' to date format column where both year and quarter are considered?
**Year_qtr GDP ADJ_GDP**
2 1947q1 243.1 1934.5
3 1947q2 246.3 1932.3
4 1948q3 250.1 1930.3
5 1949q4 260.3 1960.7
Tried parse() from dateutil package but didnt wwork.
Result dataframe should have 'Year_qtr' column as date…

ROHITH REDDY SUREDDY
- 13
- 4
0
votes
1 answer
Cumulative time strings to pandas datetime format
I am trying to work with some time series data that are in cumulative hours, however I am having trouble getting the times to convert to datetime correctly.
csv format
cumulative_time,temperature
01:03:10,30,
02:03:10,31,
... …

Ben Whit
- 3
- 1
0
votes
1 answer
How to convert the specific String to DateTime Format in flutter
String date = 'July 7,2020 10:00 AM'
How can I convert the above string to DateTime Format?

sujith sa
- 37
- 1
- 7
0
votes
1 answer
How to convert a date which maybe in any format to a specific format in python?
I want to convert a date into a specific 'yy-mm-dd' format. The input can be in any format, for example, it can be twenty-sixth May twenty twenty or 26-05-2020 or 26/05/2020 or May 26,2020 or May twenty-sixth etc.
The output for all the above…

Gandharv pathak
- 7
- 7
0
votes
1 answer
Date and time mix up in pandas
Please consider below Dataset,
The column with dates is 'Date Announced' ,current date format id 'DD-MM-YYYY' i want to change the date format to 'MM/DD/YYYY'.
To do so i have written the following pandas…

Sachi Saxena
- 13
- 2
0
votes
2 answers
Python/Panda - How reading timezone information in to_datetime()?
I am parsing csv files with a significant number of rows, and containing dates I would like to parse.
I read first the csv file, and then I am using pd.to_datetime() to transform string into Timestamps.
Here is what looks like the strings, and the…

pierre_j
- 895
- 2
- 11
- 26
0
votes
0 answers
pd.to_datetime output is 1970-01-01 00:00:00.0000
dt_corr = dt[["date","mean_press", "maxwind", "sun_dur","mean_rel_hum", "mean_temp", "mean_cloud", "max_temp_2m", ]].dropna()
dt_corr["year"] = dt_corr.date.dt.year
dt_corr.set_index("date")
dt_corr.index = pd.to_datetime(dt_corr.index,…

Jonas Apelt
- 11
- 1
0
votes
2 answers
Cannot convert string to datetime datatype using pandas to_datetime method
I'm having a hard time with pd.to_datetime() in Python 3 on Anaconda. Hopefully it's a simple fix, but it's saying that the issue is the data is a series type and not a DataFrame. Can someone please let me know if there's a quick fix to this?
This…

Jonathan Ambriz
- 29
- 1
- 7
0
votes
2 answers
Pandas to_datetime ignore the format
I was trying to convert a date stored in my dataframe to DateTime format. The column i'm trying to convert has dates stored in mm/dd/yy format.
This is the script i used to convert:
df['dt'] = pd.to_datetime(df['dt'], format = '%d-%m-%Y')
The…

sheeni
- 377
- 1
- 17
0
votes
2 answers
Cannot parse time as T when parsing RFC3339 string to time
I have a string from db , say
dbString := "2020-03-16 14:46:13 +0530 IST"
My requirement is to insert this string as Timestamptz into another table
I am trying to convert dbString into Time
timeToBeInserted :=…

Ishwarya Varadarajan
- 13
- 1
- 2
0
votes
1 answer
Pandas: How to convert datetime convert to %H:%H and stays as datetime format?
I have a dataframe in 1 column with all different times.
Time
-----
10:00
11:30
12:30
14:10
...
I need to do a quantile range on this dataframe with the code below:
df.quantile([0,0.5,1],numeric_only=False)
Following the link below, the quantile…

user3782604
- 330
- 1
- 19
0
votes
2 answers
Convert string object to date object in Python
I have a string object
value="2020-02-28"
and want output as a date object in python.
Used
datetime_value= datetime.strptime((str(value), "%b%d, %Y"))
But it does not work.

Manoj
- 1
- 1
0
votes
0 answers
Is there a way to convert "26/12/2019 06:55:21 AM" string value into a date in Angular 6?
Right now I am using primeng's p-table and one of the columns have this list of datestrings in the mentioned format and the column sorting is not right as it is sorts the string as it is and not by date value. I want this "26/12/2019 06:55:21 AM"…

Malini Srilekha
- 15
- 3
0
votes
1 answer
Date converstion using strptime skips UTC part
I am trying to convert string variable to date object the output doesnt have the UTC component.
Here is the sample code .. Appreciate your help!
import datetime
data="2016-01-19T00:00:00.000-0800"
result2 =…