Questions tagged [string-to-datetime]

217 questions
0
votes
1 answer

pandas.to_datetime with different length date strings

I have a column of timestamps that I would like to convert to datetime in my pandas dataframe. The format of the dates is %Y-%m-%d-%H-%M-%S which pd.to_datetime does not recognize. I have manually entered the format as below: df['TIME'] =…
acrow
  • 21
  • 2
0
votes
0 answers

Python to_datetime produces wrong date

I'm using Python to convert a column in my dataframe to a datetime format (which is initially loaded from a CSV file and in object format). After loading... data.info() ...results in Date 2142 non-null object. Using... data['Date1'] =…
Berbatov
  • 999
  • 1
  • 10
  • 18
0
votes
0 answers

Cannot Convert String to Timespamp inside REST

Hello:) i really hope i can find help here! the Problem: Im using Spring JPA, have created a basic REST Service, i added my Database, and i can find data in the databaste via entitymanager.createQuery() BUT when i try to search for a timestamp or a…
0
votes
1 answer

Convert fractional seconds passed since onset to a date time index

For my football data analysis, to use the pandas between_time function, I need to convert a list of strings representing fractional seconds from measurement onset into the pandas date_time index. The time data looks as follows: In order to achieve…
rickstaa
  • 405
  • 5
  • 23
0
votes
1 answer

How to convert a string (in three separate columns) to a timestamp(one column) MYSQL

Hi i'm a new coder and messed up on my sql table. Instead of storing my date with a timestamp I made the date in three separate columns: day, month, and year. I now realized that I need these in a timestamp. So I can perform more complicated…
Mason Horder
  • 108
  • 11
0
votes
0 answers

pandas - convert a column with multiple date formats to datetime

I have a column in a dataframe with multiple date formats that need to be converted to datetime. date amount September 2018 15 Sep-18 20 The output should look like date amount 2018-09-01 15 2018-09-01…
Ben Sharkey
  • 313
  • 3
  • 15
0
votes
2 answers

Python Multithreading Implementation of to_datetime Function

I need to implement multithreading to a Python job. I have a dictionary and each key in that dictionary (out of about 40) is a timestamped pandas dataframe. Most of the dataframes have 100,000+ rows. Their timestamps are strings in "%Y-%m-%d…
0
votes
4 answers

How can I convert strings like 2017-03-09T10:34:11Z to datetime?

I am trying to analyze the Open Food Facts Dataset. The Dataset is very messy! I am currently trying to convert the 'created_datetime' object to a Python datetime object. The entries in this column all look like "2017-03-09T10:34:11Z". I have tried…
Marcus
  • 105
  • 1
  • 2
  • 8
0
votes
1 answer

string to date conversion using dataweave

Input String: 201801 Output String format: 01.2018 I tried using following but it's not working, I also looked up for string to date convesrion/coercion table in "Type Coercion Table"…
N Singh
  • 1
  • 4
0
votes
0 answers

mysql CREATE TABLE STRING_TO_DATE unify two date formats

I'm trying to create a new table from my query-results with the following code while having two different date formats (formatted as text in the tweet table) in the same column: Create Table tweets_adj select t.fullname as company_name, t.`user` as…
0
votes
0 answers

Formatting Dates with Pandas

I have a question in regards to formatting dates in a column in my dataframe. I'm a bit confused as to why it isn't formatting as I was following the instructions as to how to use the pd.to_datetime method. Would anyone be able to provide me any…
Rachel Solomon
  • 177
  • 2
  • 13
0
votes
2 answers

Convert String to ISO date format in Talend

I have Excel data and trying to insert the data into MongoDB using Talend Big Data for Open Studio. This is my job, tFileInputExcel --> tMap --> tMongoDBOutput In excel sheet, i have a date value column in this format 7/13/2017(MM/dd/yyyy) as…
user3114967
  • 639
  • 5
  • 15
  • 38
0
votes
0 answers

mongoDB convert String to Date when use concat a string date

when i see the this answer// convert this type of string date And I followed it this way. 20170721123840+0900 var a = new Date({$concat: [ "2017"," ", "11"," ", "11"," ", …
sonjm
  • 15
  • 7
0
votes
1 answer

How can I speed up this routine?

I am trying to clean and convert some columns in a dataframe from dtype 'object' to dtype 'datetime': column_names = ['col a','col b', ...'col n'] df[column_names] = df[column_names].apply(pd.to_datetime, format = '%m/%Y') But this seems to take a…
GPB
  • 2,395
  • 8
  • 26
  • 36
0
votes
1 answer

Pandas to_datetime unexpected UTC return

I am trying to set time index to pandas DataFrame using pandas.to_datetime function, but the outcome datetime is UTC when converting seconds, and while it is not requested : import pandas import datetime,time datetime1 = '2017-03-30T12-00-00' d =…
dgdm
  • 85
  • 1
  • 2