futian.liu
2023-11-13 11f925fdce0f58d1f321f3a13a3f3e84221c6912
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package com.consum.base.core.utils;
 
import com.walker.infrastructure.utils.DateUtils;
 
import java.text.SimpleDateFormat;
import java.util.Date;
 
public class DateUtil extends DateUtils {
 
 
    public static void main(String[] args) {
        System.out.println(DateUtil.getCurrentDateFor14());
    }
 
    /**
     * 返回14位年月日时分秒 20230912081256
     * @return
     */
    public static Long getCurrentDateFor14(){
        Date date = new Date();
        SimpleDateFormat dateFormat= new SimpleDateFormat("yyyyMMddHHmmss");
        return Long.valueOf(dateFormat.format(date));
    }
}