Questions tagged [string-to-datetime]
217 questions
1
vote
2 answers
Converting string extracted from json value to date returning NULL
I'm saving a date in one db field in json format. The json value looks like:
[{"key":"jkajdajsdiajsdik"},{"created_date":"2018-01-17 15:51:23"}]
I want to extract the created_date from json through sql and i'm getting it through the following…

Jenz
- 8,280
- 7
- 44
- 77
1
vote
1 answer
pandas to_datetime couldn't parse string into dates and return strings
I have a Series s as
10241715000
201709060
11202017
112017
111617
102417
110217
1122018
I tried the following code to convert s into datetime;
pd.to_datetime(s.str[:7], format='%-m%d%Y', errors='coerce')
but it…

daiyue
- 7,196
- 25
- 82
- 149
1
vote
3 answers
Set the format for pd.to_datetime
Hi already referred to this post but I could not get through my issue. I have a column in my CSV which is string and the sample values are below (note that the month and year positioning are sometimes reversed). What format do I need to set in my…

Sandeep
- 1,237
- 1
- 14
- 29
1
vote
1 answer
PowerShell: Weird date format string to date time
I am having trouble handling a weird date format exported from an event log.
It looks like the following:
Mon May 14 09:32:59 UTC 2018
And I attempted generic Get-date, all the way to:
$stringToDatetime2 =…

AdilZ
- 1,107
- 6
- 27
- 44
1
vote
1 answer
Handle Perpetual Maturity Bonds with Maturity date of 31-12-9999 12:00:00 AM
I have a number of records in a dataframe where the maturity date
column is 31-12-9999 12:00:00 AM as the bonds never mature. This
naturally raises the error:
Out of bounds nanosecond timestamp: 9999-12-31 00:00:00
I see the max date…

Peter Lucas
- 1,979
- 1
- 16
- 27
1
vote
2 answers
Convert Pandas Column to DateTime With Rare Date Format
I have one column on my dataframe that follows this date format:
17 MAY2016
I've tried to follow this reference: http://strftime.org/ and pandas.to_datetime reference:…

User 6683331
- 692
- 1
- 13
- 31
1
vote
5 answers
Inserting a date in a column of date datatype in SQL Server
How can I insert a date of format dd-mm-yyyy into a column of datatype Date?
Tried the below but showing errors
INSERT INTO Profiles (first_name, last_name, email, phone,
[city(hometown)], created_at, gender,
…

Biswa
- 343
- 2
- 4
- 14
1
vote
2 answers
Convert string to date using moment.js
This my model.ts
export class Feature2 {
requestRouteTemplate: string;
requestMethod: string;
numberCount: number;
requestDate: date;
constructor(values: Object = {}) {
Object.assign(this, values);
}
}
This is component.ts
…

Deniz Adıbelli
- 39
- 1
- 1
- 3
1
vote
1 answer
convert string data type duration to date time format in Pandas
How do I extract just the time portion of datetime64[ns] column formatted 1900-01-01 00:32:59 and convert it into total seconds?
I want the end result to be 1979 in seconds in this example, where we are exactly (32*60 + 59) seconds from 1900-01-01…

Rafel Taye
- 11
- 2
1
vote
1 answer
Set a specific date to a datetimepicker in c#
I have a date coming from a database as a string. I want to set it to a datetimepicker.
The problem is, it can be in many formats, such as:
d/m/yyyy
d/mm/yyyy
dd/m/yyyy
dd/mm/yyyy
I don't know how to do it.
If I can convert this to something…

jayz
- 401
- 1
- 5
- 25
1
vote
3 answers
Convert string to datetime in javascript and compare with current time
I am trying to pick up value from datetimepicker tetxbox and compare those values with current time.
JSFiddle
//startTime textbox text = 19/12/2014 03:58 PM
var startTime = Date.parse($('[id$=txtStartDate]').val().toString());
…

Mudassir Hasan
- 28,083
- 20
- 99
- 133
1
vote
1 answer
PostgreSQL to_date()
I have a problem with PostgreSQL to_date() function, in my code mentioned bellow I get syntax error but can't find where.
SELECT * from crosstab('select upit, sat, count(*) as broj
from upiti
…

DynamicsNinja
- 177
- 1
- 3
- 17
1
vote
1 answer
Is it Possible with without format parsing converts string to date or timestamp
String string_Date = "2014-06-11"; //my string date
SimpleDateFormat simpleFormat = new SimpleDateFormat("yyyy-MM-dd");
// Date startTimestam = simpleFormat.parse(string_Date);
Timestamp startTimestam = Timestamp.valueOf(string_Date);
Calendar…

user3599212
- 429
- 2
- 6
- 18
1
vote
2 answers
Apache Pig Todate() function issue
I am converting a date string to datetime format in Pig using Todate function, but it is spitting out the wrong month.
input date = "2014-04-15 01:25:33.583Z" I am loading this as chararray
usage: ToDate(Timestamp,'YYYY-MM-DD HH:mm:ss.SSS')
output :…

cryp
- 2,285
- 3
- 26
- 33
1
vote
0 answers
the phonegap navigator.globalization.stringToDate with iOS
I am using phonegap build 2.9 and 3.1 and ipad mini 7.04
navigator.globalization.stringToDate('9/25/2012',function(date)
{ alert('success');},function () { alert('fail'); },{selector:'date'});
in Android
when I set selector "date", it will…

user2469560
- 89
- 1
- 4