I have a date as a string in the following format "04/02/2011 20:27:05"
. I am using Joda-Time library and would like to convert it to DateTime
object. I did:
DateTime dt = new DateTime("04/02/2011 20:27:05")
But I'm getting the following error :
Invalid format: "04/02/2011 14:42:17" is malformed at "/02/2011 14:42:17"
How to convert the above date to a DateTime
object?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…