Linked Questions
169 questions linked to/from Converting ISO 8601-compliant String to java.util.Date
104 votes
12 answers
219k views
SimpleDateFormat parsing date with 'Z' literal [duplicate]
I am trying to parse a date that looks like this: 2010-04-05T17:16:00Z This is a valid date per http://www.ietf.org/rfc/rfc3339.txt. The 'Z' literal (quote) "imply that UTC is the preferred ...
36 votes
3 answers
128k views
JSON date to Java date? [duplicate]
I could not find this anywhere. I fetch some JSON from an API that returns standard JSON dates. You can see the format by running this code in a JavaScript console: > new Date().toJSON(); "2010-10-...
5 votes
2 answers
37k views
How to convert time in YYYY-MM-DDTHH:mm:ss.SSSZ format to default timezone? [duplicate]
The time that I am getting is in the format "2011-07-31T08:16:37.733Z". Actually the Z should be the timezone and then that time is converted to local timezone. How do I actually convert this time to ...
4 votes
4 answers
26k views
How do I pass a Date as SQL parameter in Java without losing the time part? [duplicate]
For example, I have this String: 06/10/2013 18:29:09. I want to convert this string and put it in a SQL database (as Date). How can I convert this to an sql date, so that it could be inserted into a ...
1 vote
3 answers
53k views
How to parse "yyyy-MM-dd'T'HH:mm:ss.SSSXXX" date format to simple in Android? [duplicate]
How do I can parse this date 2018-01-09T11:11:02.0+03:00 to dd.MM.yyyy hh:mm format in Android? And what does T between 09 and 11 mean? Thanks. I don't know how the back-end developer got this ...
2 votes
4 answers
15k views
Converting a String to Date, almost done! [duplicate]
Possible Duplicate: Converting ISO8601-compliant String to java.util.Date I'm trying to convert this String: 2011-06-07T14:08:59.697-07:00 To a Java Date, so far, here's what I did: ...
2 votes
8 answers
11k views
parse this type of date format in java? [duplicate]
what would be the easiest way to parse this date format below in java?: 2010-09-18T10:00:00.000+01:00 i read the DateFormat api in java and could not find a method that takes a string or even this ...
2 votes
2 answers
18k views
Converting a String to Java Date in ISO 8601 date-time format [duplicate]
I am trying to convert a string into an ISO 8601 date-time format. Currently, this code String s1 = "2001-05-03T00:00:00+00:00"; Date firstAvailableDateTime = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:...
3 votes
2 answers
14k views
Java - Converting yyyy-MM-dd'T'HH:mm:ssZ to readable dd-MM-yyyy [duplicate]
I will have a String input in the style of: yyyy-MM-dd'T'HH:mm:ssZ Is it possible to convert this String into a date, and after, parsing it into a readable dd-MM-yyyy Date Object?
2 votes
2 answers
21k views
Convert iso8601 string date time format to date in Java [duplicate]
All, I know I have asked a similar question on parsing an ISO8601 date string into a Date using Java before, but this is a more specific problem using the SimpleDateFormat class. I have read the ...
2 votes
3 answers
7k views
How to format an ISO-8601 string in Java? [duplicate]
How do I format an ISO-8601 string 2020-02-10T22:55:13-08:00 into a custom format like 1:30pm? I kept getting unparseable date exception. My code snippet is below: String string = "2020-02-10T22:...
1 vote
1 answer
9k views
Parse datetime with ISO format in Scala [duplicate]
Which format I should use to parse a String date (using ISO 8601) in Scala? 2018-12-13T19:19:08.266120+00:00 I just try some patterns but no success. This code show me a near date as String, but ...
1 vote
2 answers
9k views
convert timestamp to ISO860 in java, [duplicate]
Possible Duplicate: Converting ISO8601-compliant String to java.util.Date I have issues when changing the timestamp to ISO 8601 in JS as it errors at 'topicDate' in IE and Firefox, but it works in ...
-1 votes
4 answers
4k views
Conversion of DateTime in java [duplicate]
One of the fields of my json is a String which contains time in the following format: 2017-04-04T20:22:33 or even 2017-04-07T12:21:10.0355277+00:00. My task is to convert it to a more simple ...
0 votes
2 answers
4k views
Parse timestamp string to Java.sql.timestamp [duplicate]
I have the following timestamp in String format 2019-04-06T00:43:21+00:00 2019-04-04T21:24:33+00:00 2019-04-04T21:02:16+00:00 How can I parse the timestamp strings above to Java.sql.timestamp?