Questions tagged [string-to-datetime]
217 questions
0
votes
4 answers
Wrong Dates in Pandas
I am trying to read a csv file which has a Date column. The dates are stored as 8/27/1962, 9/12/1959 and 7/15/1965. When I am using the to_datetime function, the dates being converted to 8/27/2062, 9/12/2059 and 7/15/2065. I am not sure why this is…

Prince Modi
- 425
- 1
- 4
- 16
0
votes
1 answer
Convert string to date format within arrays in MongoDB with $dateFromString (presence of NaT)
I am trying to convert some string into date format with MongoDB using $dateFromString. However, since my fields of interested are part of an array, I have encountered some problems in writing down the correct code. Following the this discussion, I…

Nicola Caravaggio
- 71
- 12
0
votes
1 answer
python method to convert string in format "11th November" into a date
I am using python in scrapy and collecting a bunch of dates that are stored on a web page in the form of text strings like "11th November" (no year is provided).
I was trying to use
startdate = '11th November'
datetime.strptime(startdate, '%d…

mdkb
- 372
- 1
- 14
0
votes
1 answer
How to convert string 'mm-yyyy' column to timestamp in MYSQL?
I want to convert string column of format 'mm-yyyy' to timestamp.

Meet Patel
- 59
- 2
- 12
0
votes
1 answer
Derive pandas datetime from mix integer format
I want to derive a DateTime column from a mixed range of integer column in a panadas dataFrame. The input column is as below. As you see there is a various length of integer numbers in that column. I want to return:
180000 = 18:00:00
60000 =…

PedramTF
- 1
0
votes
1 answer
create oracle date with time stamp from HH24 string
I have hour in 'HH24' format. For example: '13:35' I need to convert this into today's date of '13:35' in the time stamp - "dd/mm/yyyy HH24:MI:SS".
To_timeStamp() method returning me the date with timestamp of starting of the month.
It is returning…

DAIRAV
- 723
- 1
- 9
- 31
0
votes
4 answers
Convert string to date in python if date string has different format
My data has date variable with two different date formats
Date
01 Jan 2019
02 Feb 2019
01-12-2019
23-01-2019
11-04-2019
22-05-2019
I want to convert this string into…

Sangram
- 407
- 1
- 6
- 18
0
votes
1 answer
How to convert string year-dayofyear-milliseconds to datetime object
In a pandas DataFrame I have weird datetime format like so:
0 201913907050435
1 201913908520126
2 201914004163647
3 201914019315651
4 201914019320917
Name: DATETIME, dtype: object
What I know is, that it's Year followed by day of…

Sebastian N
- 131
- 2
- 9
0
votes
1 answer
Dataweave 2 - Cannot coerce String to DateTime
I have a String as DateTime like this 2019-05-21 00:00:00.000.
This is the code that I use in Dataweave 2 to transform String to DateTime:
SourceDate: payload.Source_date as DateTime {format: "yyyy-MM-dd'T'HH:mm:ss.SSSZ"}
But it returns this…

gtx911
- 1,189
- 4
- 25
- 46
0
votes
0 answers
String was not recognized as a valid DateTime Datetimepicker vb.net
I need to show a date that I got from the mysql database in the datetimepicker. I'm getting this error when I run this code.
System. FormatException: String was not recognized as a valid
DateTime.
at System.DateTimeParse.ParseExact(String…

Nemar162
- 30
- 3
0
votes
1 answer
How to concatenate pandas dataframe date and different time formats to single timestamp?
I have two columns in a pandas data frame as outlined below. Notice how some of the EVENT_TIME is in hh.mm.ss, some is in hh:mm:ss AM/PM format.
When running...
import pandas
df['EVENT_DATE'] = pd.to_datetime(df['EVENT_DATE'],…

SeaDude
- 3,725
- 6
- 31
- 68
0
votes
2 answers
Dataweave 2.0 - Cannot coerce String to LocalDateTime
I get a CSV file with data that I transform to application/java.
One of the fields (Creation_Date) is a DateTime field that I get as String because the output field is a string type.
Input field: Creation_Date (String) - Example: 2019-03-02…

gtx911
- 1,189
- 4
- 25
- 46
0
votes
3 answers
Transform varchar with non numeric char to date
I have date like 'Mon Sep 14 09:03:10 +0000 2015', that I did not succeed in transforming them into date format
Already tried to_date/to_timestamp and different format spec
For example:
select TO_TIMESTAMP_TZ('Mon Sep 14 09:03:10 +0000 2015') from…

Tristan Salord
- 57
- 1
- 10
0
votes
1 answer
error using resample , says 'only valid with datetimeindex' even though i used to_datetime and set_index
I have a dataframe with two columns: 'case' and 'datetime' .
index------ case----------outDateTime
71809----10180227.0-----2013-01-01 01:41:01
71810----10180229.0-----2013-01-01 04:20:05
71811----10180230.0-----2013-01-01…

enter_thevoid
- 113
- 1
- 11
0
votes
1 answer
Why do I get date does not match format error in Python Pandas?
I am using to analyse a .csv files which only contains two columns:
date
time_taken
A snipped of the csv is:
date,time_taken
01-02-2019,2.3
02-02-2019,3.3
03-02-2019,2.8
04-02-2019,4.5
05-02-2019,1.2
06-02-2019,6.7
I am getting this…

Dilshad Abduwali
- 1,388
- 7
- 26
- 47