| | |
| | | |
| | | import org.apache.poi.util.LocaleUtil; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.Calendar; |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 将LocalDateTime对象转换为字符串 |
| | | * @return |
| | | */ |
| | | public static String toString(LocalDate date,String format) { |
| | | // 定义日期时间格式 |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern(format); |
| | | String str = date.format(formatter); |
| | | return str; |
| | | } |
| | | |
| | | |
| | | |
| | | public static Date getJavaDate(double date) { |
| | | return getJavaDate(date, false, (TimeZone)null, false); |
| | | } |