austinspark-jessylu

/**
     * 时间转换
     * @param data
     * @return
     */
    public String getValidDateStr(Date data) {
        String sDate = "";
        SimpleDateFormat sdf1 = new SimpleDateFormat("EEE MMM dd HH:mm:ss Z yyyy", Locale.UK);
        try {
            Date date = sdf1.parse(sdf1.format(data));
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            sDate = sdf.format(date);
        } catch (ParseException e) {
            logger.error("日期装换方法是把:" + data + "******" + e);
        }
        return sDate;
    }

分类:

技术点:

相关文章:

  • 2021-06-03
  • 2021-11-01
  • 2021-12-26
  • 2021-09-08
  • 2022-02-09
  • 2020-04-20
  • 2022-01-05
  • 2021-12-08
猜你喜欢
  • 2021-11-09
  • 2022-02-08
  • 2021-08-06
  • 2021-09-17
  • 2021-07-17
  • 2021-09-27
  • 2021-10-20
相关资源
相似解决方案