string-to-datetime Questions

2

I am trying to convert a column "travel_start" to a datetime object. Dashboard["travel_start"] = pd.to_datetime(Dashboard["travel_start"]) But I get the following error: ParserError: year 0 is...
Bute asked 11/2, 2020 at 15:21

2

Solved

I have a date time column in a Pandas DataFrame and I'd like to convert it to minutes or seconds. For example: I want to convert 00:27:00 to 27 mins. example = data['duration'][0] example resu...
Kawai asked 25/10, 2014 at 19:1

17

Solved

I want to convert a string like this: '10/15/2008 10:06:32 PM' into the equivalent DATETIME value in Sql Server. In Oracle, I would say this: TO_DATE('10/15/2008 10:06:32 PM','MM/DD/YYYY HH:MI...
Godforsaken asked 16/10, 2008 at 2:8

2

Solved

I am trying to convert a datetime object to datetime. In the original dataframe the data type is a string and the dataset has shape = (28000000, 26). Importantly, the format of the date is MMYYYY o...
Forequarter asked 1/7, 2020 at 11:46

1

Solved

I am reading two types of csv files that are very similar. They are about the same lenght, 20 000 lines. Each line represent parameters recorded each second. Thus, the first column is the timestamp...
Kamilahkamillah asked 24/9, 2018 at 13:47

3

Solved

I'm trying to convert a unix time stamp to display like facebook and twitter. For example, when you see tweets or comments placed on twitter/facebook you see the date/time displayed like so: '2 mi...
Columbine asked 13/7, 2011 at 12:38

3

Solved

I have a .csv file in such format timestmp, p 2014/12/31 00:31:01:9200, 0.7 2014/12/31 00:31:12:1700, 1.9 ... and when read via pd.read_csv and convert the time str to datetime using pd.to_datet...
Citified asked 16/8, 2015 at 11:42

6

Solved

MySQL has a function called STR_TO_DATE, that converts a string to date. Question: Is there a similar function in SQL Server?
Transceiver asked 19/8, 2010 at 19:41

3

Solved

I have 3 columns 1. dd/mm/yyyy (stored as a string) 2. app_id and #downloads of apps I have to find unique ids of apps downloaded within a week. Thank you
Aubin asked 12/3, 2015 at 17:53

4

Solved

Code : let dateString = "2016-04-02" var formatter: NSDateFormatter = NSDateFormatter() formatter.timeZone = NSTimeZone(abbreviation: "GMT +3:00") formatter.dateFormat = "yyyy-MM-dd" println("...
Rooker asked 2/4, 2015 at 7:43

2

Solved

I have a dataframe where the names of the columns are dates (Year-month) in the form of strings. How can I convert these names in datetime format? I tried doing this: new_cols = pd.to_datetime(df....
Townsfolk asked 16/1, 2017 at 13:47

2

Solved

I am working with .csv data that was exported from Teradata. Several columns were originally timestamps with timezones, so after loading the .csv in R I'd like to convert these columns (which are l...
Fullmer asked 22/2, 2013 at 19:53

3

Solved

I have tried several ways of using to_datetime, but so far I can only get it to return the dtype as "object" pd.to_datetime(pd.Series(['28Dec2013 19:23:15']),dayfirst=True) The return from this...
Verboten asked 12/8, 2015 at 19:34
1

© 2022 - 2024 — McMap. All rights reserved.