时间日期处理(时间类型转化成字符串(年月日时分秒) format)

public static java.lang.String format(java.util.Date date)

时间类型转化成字符串(年月日时分秒).

参数:

date - 需要转化的时间

返回:

时间字符串(yyyy-MM-dd HH:mm:ss)

/**
     * 时间类型转化成字符串(年月日时分秒).
     * @param date 需要转化的时间
     * @return 时间字符串(yyyy-MM-dd HH:mm:ss)
     */
    public static String format(Date date){
        return format1.format(date);
    }

猜你喜欢

转载自blog.csdn.net/gongjian0321/article/details/89194422