| | |
| | | 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(){ |
| | | public static Long getCurrentDateFor14() { |
| | | Date date = new Date(); |
| | | SimpleDateFormat dateFormat= new SimpleDateFormat("yyyyMMddHHmmss"); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); |
| | | return Long.valueOf(dateFormat.format(date)); |
| | | } |
| | | } |