Timestamp from String in android -


i have problem timestamp. string: 2014-09-20 18:49:48.773829+00:00 , need timestamp string. when use timestamp.valueof(string) get:

    java.lang.illegalargumentexception: timestamp format must yyyy-mm-dd hh:mm:ss.fffffffff; '2014-09-20 18:49:48.773829+00:00'             @ java.sql.timestamp.badtimestampstring(timestamp.java:507)             @ java.sql.timestamp.valueof(timestamp.java:467)             @ com.android.volley.toolbox.jsonrequest.deliverresponse(jsonrequest.java:65)             @ com.android.volley.executordelivery$responsedeliveryrunnable.run(executordelivery.java:99)             @ android.os.handler.handlecallback(handler.java:733)             @ android.os.handler.dispatchmessage(handler.java:95)             @ android.os.looper.loop(looper.java:136)             @ android.app.activitythread.main(activitythread.java:5017)             @ java.lang.reflect.method.invokenative(native method)             @ java.lang.reflect.method.invoke(method.java:515)             @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:779)             @ com.android.internal.os.zygoteinit.main(zygoteinit.java:595)             @ dalvik.system.nativestart.main(native method) 

how can timestamp string?

the answer in first string - timestamp format must yyyy-mm-dd hh:mm:ss.fffffffff. otherwise you'll parsing exception.


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -