Questions tagged [date-parsing]

Date-parsing refers to programming logic which reads one or more parameters, attempts to match it to a supported or specified date format, then returns the resulting Date if successful.

References

494 questions
0
votes
2 answers

Date parser function for hh:mm:ss.sss format

I have a time stamp with hh:mm:ss.sss format 2013-11-02 00:00:00.125 How can I parse this kind of value in python? The 3 digits in the end may differ in another value I mean .825 or something different I tried with this function parseA=lambda x:…
gis20
  • 1,024
  • 2
  • 15
  • 33
0
votes
2 answers

Java SimpleDateFormat.parse throws : Unparseable date: "2015-10-06T08:00:00+00:00" (at offset 10)

Hello i have the following string with datetime: public static String nextOccurenceString = "2015-10-06T08:00:00+00:00"; And i want to parse and format string into the following format by following pattern: public static String pattern =…
redrom
  • 11,502
  • 31
  • 157
  • 264
0
votes
2 answers

DateTime.TryParseExact failing with seemingly correct format C#

I have the following code in a test project that I'm working on. Trouble is, TryParseExact keeps displaying an error instead of parsing my date correctly and storing in the dParsedDate variable. What am I doing wrong here? I can't see any issues…
Neitherman
  • 77
  • 2
  • 11
0
votes
2 answers

Validate a datetime using: Y-m-d H:m:s in javascript

Pretty simple question, how do i validate a datetime, so the input is both the correct format, but also a valid date unlike 2015-02-30 .... 2015-06-28 16:06:35 //Valid
user4122038
0
votes
1 answer

Parser date in Python

I've a list of dates. Some of the dates get parsed using from dateutil import parser , but others dont. The list of dates that dont get parsed are :- date1 = 'Tue Feb 10 2015 12 52pm IST' date2 = '10 February 15 08 35am' date3 = '2015 02 10 08 24…
Praful Bagai
  • 16,684
  • 50
  • 136
  • 267
0
votes
2 answers

javascript Data.parse in ruby

I want to use HighCharts to render some historical data. The issue is the chart is working with dates which are parsed using Data.parse function. As explained here: The Date.parse() method parses a string representation of a date, and returns the…
gotqn
  • 42,737
  • 46
  • 157
  • 243
0
votes
1 answer

Unparseable date error in Pentaho

I am using Pentaho to insert and update a table in Mysql. Source database being oracle 11g and destination is Mysql database. The query for getting max syncronization time from oracle is SELECT max(SYNC_TIME) AS LST FROM…
freshMan
  • 55
  • 1
  • 3
  • 11
0
votes
2 answers

Problems converting string to DateTime

I am making a program in which there is a function that check the database for user that haven't been called for 2 weeks or more, and shows them in a ListView. In this part I am checking how long ago they were called: Dim r As Int32 =…
mielleman
  • 15
  • 2
0
votes
2 answers

Detecting the date format in Java

I am grabbing dates from Various API's like G+ FB and Skype, I have one following function which I got from here private static final Map DATE_FORMAT_REGEXPS = new HashMap() {{ put("^\\d{8}$", "yyyyMMdd"); …
User3
  • 2,465
  • 8
  • 41
  • 84
0
votes
1 answer

Searching Database by Arbitrary Date in PHP

Suppose you have a messaging system built in PHP with a MySQL database backend, and you would like to support searching for messages using arbitrary date strings. The database includes a messages table, with a 'date_created' field represented as a…
jverdi
  • 1,506
  • 13
  • 14
0
votes
1 answer

NSDateFormatter format string for RFC 3339 date string without milliseconds

I am having an issue trying to parse an Atom RFC 3339 date coming from a feed. Is is coming in is form: @"2014-07-21T11:36:05-05:00" and the following formats fail to parse it... any help? [dateFormatter…
izk
  • 1,189
  • 2
  • 8
  • 23
0
votes
1 answer

NSDateFromString, parsing a date in the very past

I'm executing this code to parse date 01 January 1800: NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; [formatter setDateFormat:@"ddMMyyyy"]; NSDate *date = [formatter dateFromString:@"01011800"]; when I print date with …
giampaolo
  • 6,906
  • 5
  • 45
  • 73
0
votes
1 answer

Parsing dates using localtimezone to date object in javascript

I want to parse a date into a javascript date object. I am using the following new Date(Date.parse('2012-08-01')) The problem is my input date can be in multiple formats and parsing it should always give me the date object with the date…
Whimsical
  • 5,985
  • 1
  • 31
  • 39
0
votes
1 answer

SimpleDateFormat fails to parse and returns null

I am getting a null returned by SimpleDateFormat. But I feel I have done everything correctly. Below is my code snippet format = new SimpleDateFormat("yyyy-dd-MM'T'H:mm:ss'Z'", Locale.US); format.setLenient(true); ParsePosition pos = new…
promaxdev
  • 455
  • 1
  • 6
  • 19
0
votes
2 answers

Angularjs + moments-js returns wrong date

i use angularjs and i want parse a string to a date my code looks like this: var d=moment.utc("2011-10-02T22:00:00.000Z", "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); var year =d.year(); var month =d.month(); var day…
user2115378
  • 931
  • 3
  • 14
  • 22