Questions tagged [datetime-parsing]

423 questions
0
votes
2 answers

java: ParseException: Unparseable date

i have a SimpleDateFormat format = new SimpleDateFormat("d M y H:m"); and i try to parse the String "8 Jan 2019 16:47" with it, but i get a ParseException. Did i create it the wrong way? According to docs.oracle.com the M should recognize…
0
votes
2 answers

java.time.format.DateTimeParseException: Text 'Tue Jan 08 00:00:00 IST 2019' could not be parsed at index 0

I am facing DateTimeParseException even after giving appropriate format DateTimeFormatter ft = DateTimeFormatter.ofPattern("EEE MMM dd HH:mm:ss z yyyy"); LocalDateTime.parse("Tue Jan 08 00:00:00 IST 2019", ft); Please help if I am missing…
0
votes
1 answer

Format ZonedDateTime

I need to format a ZonedDate time to format MM/dd/yyyy. ZonedDateTime zonedDateTime = ZonedDateTime.now(); String date = DateTimeFormatter.ofPattern("MM/dd/yyyy").format(zonedDateTime); ZonedDateTime zoneDate = ZonedDateTime.parse(date); Getting…
Drew13
  • 1,301
  • 5
  • 28
  • 50
0
votes
0 answers

SimpleDateFormat parse doesn't work on Date in UTC format from database

I use Parse.com and each ParseObject has date column with Date type in UTC format. I want to sort those object which I get from query by date. So I'm using SimpleDateFormat and Comparator to compare dates but It throws this…
0
votes
1 answer

java.text.ParseException - With right format

I'm trying to parse this date Thu, 15 Nov 2018 16:56:49 +0000 With this code: Date date = null; try { SimpleDateFormat parser = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss Z"); date = parser.parse(xmlPullParser.nextText()); }…
0
votes
1 answer

new SimpleDateFormat("hh:mm a", Locale.getDefault()).parse("04:30 PM") giving Unparseable exception

Strange things happen at most desperate times. I'm experiencing a bit strange thing in this line of code Date time = new SimpleDateFormat("hh:mm a", Locale.getDefault()).parse("04:30 PM"); is giving "Unparseable date: \"04:30 PM\" (at offset…
Ammar Tahir
  • 312
  • 4
  • 19
0
votes
1 answer

How to Set RadTime Picker Value on My ASpx Page

In my database I have a Datetime field DaysWorkedArrived On my Aspx Page I have a RadDatePicker and A RadTimePicker. When I add a new record to the database I can build the datetime string to populate that field. On My ASPX Edit form I need to split…
Perry
  • 1,277
  • 2
  • 17
  • 39
0
votes
1 answer

Parsing Dynamic Time Format in Go

I'm working with an external API that will sometimes shorten the returned timestamp if the last values are zero. layout := "2006-01-02T15:04:05.000" opened, err := time.Parse(layout, externallyFormattedTimestamp) if err != nil { …
kue
  • 341
  • 1
  • 4
  • 11
0
votes
4 answers

Java SimpleDateformatter with 10 decimals after the seconds, cannot convert to Date

I'm trying to convert date string with 10 milliseconds (2018-11-02 6:05:59.1541162159 PM) to date but not able get the exact date. Code to convert: import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import…
0
votes
2 answers

How to parse "uuuu'-'MM'-'dd'T'HH':'mm':'ss;FFFFFFFFFo" into an Instant?

I have this class: public class Test { public Instant I { get; set;} } I is an Instant because it's what makes sense semantically. However, I have to deserialize it from this: { "i": "2018-10-25T18:34:11.911+00:00" } and from this: { …
Paulo Morgado
  • 14,111
  • 3
  • 31
  • 59
0
votes
1 answer

Formating time and plot it

I have the following excel file and the time stamp in the format 20180821_2330 1) for a lot of days. How would I format it as standard time so that I can plot it versus the other sensor values ? 2) I would like to have a big plot with for example…
andre
  • 731
  • 2
  • 13
  • 27
0
votes
1 answer

Parse mongo db field's value "date" into golang with parse method of time package

I've created_date column as a string and value of it like 2018-10-04 15:42:19.000404667 +0000 UTC m=+103.387519062 which I got from mongo db columns and now I inserted it into mysql table and of course it is of string type. Now the problem is that I…
saddam
  • 809
  • 8
  • 23
0
votes
1 answer

H2 Database Delete Records Older than particular Days

I have to delete all the records from H2 Database by matching completed_date column with current time stamp where difference in days are greater than 1 (or an number of days). There is one problem with the schema of database that completed_date is…
Nitin Rathod
  • 159
  • 2
  • 15
0
votes
1 answer

org.threeten.bp.format.DateTimeParseException: Text '2018-07-22T14:00:00-03:00' could not be parsed at index 19

public static String formatter(String dateInPattern, String dateOutPattern) { OffsetDateTime dateInPatternFormat = OffsetDateTime.parse(dateInPattern, DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssZ")); Date dateInValue =…
0
votes
2 answers

Verify the string " 2 Sep 2018 09:00 " is a valid date format

I know there are multiple questions asking to verify a valid date. But I was unable to find out the exact format. So please do not mark this as a duplicate. I have a date returned as a string E.g., 2 Sep 2018 09:00 in my web page. I need to verify…
Ushani
  • 1,199
  • 12
  • 28