工具类:TimeUtil

来源:互联网 发布:德州淘宝村 编辑:程序博客网 时间:2024/05/20 06:04
package com.hxsmart.intelligentizepos.util;import java.text.SimpleDateFormat;import java.util.Date;/** * Developer : xiongwenwei@aliyun.com * Create Time :2016-5-20 14:07:05 * Function:获取日期、时间 */public class TimeUtil {    public static String getDate() {        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");        Date date = new Date();        return simpleDateFormat.format(date);    }    public static String getTime() {        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HHmmss");        Date date = new Date();        return simpleDateFormat.format(date);    }}

0 0