converting long string to date

前端 未结 6 673
盖世英雄少女心
盖世英雄少女心 2020-12-20 02:40

I am getting date value from DB as a long value. I am converting this to string to use parse function. Given below is my code

6条回答
  •  隐瞒了意图╮
    2020-12-20 03:10

    Try this

    Date date1 = new SimpleDateFormat("MMddyyyySSS").parse(strDate1);
    

    Hope it will works for 12302012235 , but i assume 235 is millisec.

提交回复
热议问题