java - DateTime ParseException for date with offset -


How can I parse a date string such as 2014-04-25T01: 50: 00.000-06: 00? I'm using add datetime and tried to do something like this:

  public static string format date (date D) {simple data format mdyFormat = new SimpleDateFormat ("yyyy-MM-dd ' HH: mm: ss .00'0Z '"); String mdy = mdyformat.format (d); Return MDI; }   

However, the result is an error:

java.text.ParseException: ineffective date: "2014-04-25T01: 50: 00.000- 06 : 00 "

Try defining the format like this: date format mdyFormat = new simple data format ("yyyy-MM-dd'H'HH: mm: ssZ")

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -