Questions tagged [datetime-parsing]

360 questions
-2
votes
3 answers

Converting String of different timezone to date of different timezone

I have had look to answers mentioned already but they don't tackle the problem I am facing. I have a String in GMT as: 2017-10-03T19:45:00.000+0000 Which I need to parse as any other time zone. The problem is those +0000. When I try to parse it…
-2
votes
3 answers

I have a string date format 01/01/2017 6:54 PM and want to convert it to 2017-01-01T00:00:05.383+0100 ISOFormat in scala

def cleantz( time : String ) : String = { var sign_builder= new StringBuilder ++= time println(sign_builder) var clean_sign = "" if (sign_builder.charAt(23).toString == "-"){ clean_sign=…
Joyce obi
  • 59
  • 1
  • 11
-2
votes
2 answers

Is this Date a valid one in Java?

Is this 00/00/00 a valid Date which is in MM/dd/yy format in Java? I have tried this below sample code to see if the 00/00/00 is a valid one in Java. But, the date which is getting parsed is SUN Nov 30 00:00:00 IST 2. public static void…
-2
votes
2 answers

How to solve the error convert String date from xml file to an int format?

I also find myself facing the date problem today, I extracted the date from an xml file in string format but when I try to convert it into an int format I have an error. This is a part of my code : DocumentBuilder dBuilder =…
celia
  • 29
  • 1
  • 6
-2
votes
1 answer

c# DateTime.ParseExact error

I have a String was not recognized as a valid DateTime error. Followed one of the examples from here. Which has an example that says: dateString = "15/06/2008 08:30"; format = "g"; provider = new CultureInfo("fr-FR"); try { result =…
bbusdriver
  • 1,261
  • 2
  • 21
  • 42
-3
votes
1 answer

How can we achieve Date splits/Break in dates in Java

Here Java need to read a file which has Contract, Member, Start-Date and End-Date. If there are date split/break in dates it need to be populated in a target file at contract level. Below provided the Source file and Target file example and the…
-3
votes
1 answer

Unparseable date: "Thursday 01 March 2018 12:43:38 PM IST"

I am getting a parse exception when inserting "Thursday 01 March 2018 12:43:38 PM IST" into MySQL as a timestamp. How can I convert this string for insertion into a MySQL timestamp column?
-3
votes
4 answers

Setting current date from ISO 8601 in object Calendar format using Java

Im trying to set the Calendar date object in the following way, but I don't know how. public void setTradeDate(String tradeDate) { Calendar tradeDate = ? } The String is in the format: String tradeDate = "2017-06-01T15:49:18Z";
Syed
  • 2,127
  • 9
  • 36
  • 69
-3
votes
2 answers

Any ideas on how I could compare 2 dates in string format?

Any ideas on how I could compare 2 dates in string format: String1 = "Wed May 18 00:00:00 CDT 2011" String2= "May. 18, 2011" I tried converting String1 to date format of String2 but was not very successful. I tried converting String1 to date using…
-4
votes
3 answers

How to Convert JSON Date Format to Simple Date Format?

I am receiving response of Date in JSON format like /Date(1521866513877+0530)/ which I want in format like this 24/03/2018 10:11:53.
-4
votes
2 answers

How to Convert String(2017-08-01T15:15:03.313000000+02:00) to TimeStamp

String str = "2017-08-01T15:15:03.313456768+02:00"; // The following statement gives IllegalArgumentExceptionTimestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff] Timestamp timeStamp = Timestamp.valueOf(str); ZonedDateTime zoneddate =…
-4
votes
1 answer

How to handle negative ISO 8601 date string in java?

I am trying to convert ISO 8601 date string to epoch time. How do I handle negative dates? Is the below code correct? Should I use something else instead of simple date format library? Negative dates are for BC. String formatString =…
Zack
  • 1,794
  • 10
  • 23
  • 46
-5
votes
2 answers

How to convert time string value in date format

I am facing issue like I have a datasheet which have a string value like 123459 which is a time and I have another column where I am adding in value as plus 5 seconds. When I am adding value its add as 123464 instead of 123504. Could anyone help me…
-5
votes
2 answers

Generating Datetime sequence using Joda-Time API

I want to generate a sequence of time in the following format (yyyy-mm-dd hh:mm:ss) with time interval of 15 min. I will give start date and end date. Used the below code to test the same. public static void main(String[] args) throws…
-5
votes
1 answer

String was not recognized as a valid DateTime from DateTimePicker

I get his error at hnddate(hidden field value coming from date time picker): String was not recognized as a valid DateTime.when converting a string to datetime parse the string to take the date before putting each variable DateTime weekStartDate…
user2525244
  • 91
  • 1
  • 2
  • 12
1 2 3
23
24