String -> java.util.Date -> java.sql.Date (with time stamp)

后端 未结 3 1982

Here is my problem: I have a user input a date like: 2012-12-24 (string) I concatenate a time to that string, and convert to java.util.Date My code looks like:



        
3条回答
  •  囚心锁ツ
    2020-12-10 06:26

    I have completely given up on using Java's standard Date classes, for exactly the reasons you list.

    I've been using Joda Time for a while now, and have found it a lot simpler.

提交回复
热议问题