bengbengbalabalabeng commented on issue #713:
URL: https://github.com/apache/fesod/issues/713#issuecomment-3575356331

   In Excel, dates and times are not independent data types. Instead, they are 
stored as **serial numbers**, essentially floating-point values. The integer 
part represents the date, while the fractional part represents the time. As a 
result, rounding effects may occur when displaying these values.
   
   References:
   - [Date and time functions (reference) - Microsoft 
Support](https://support.microsoft.com/en-us/office/date-and-time-functions-reference-fd1b5961-c1ae-4677-be58-074152f97b81)
   - [Date systems in Excel - Microsoft 
Support](https://support.microsoft.com/en-us/office/date-systems-in-excel-e7fe7167-48a9-4b96-bb53-5612a800b487)
   
   ---
   
   If the exported column format is not restricted, you can use 
`LocalDateTimeStringConverter` to convert the time field into a string before 
writing it to Excel, thereby avoiding precision issues. For example:
   
   ```java
   public class ExcelModel {
       @ExcelProperty(value = "Time", converter = 
LocalDateTimeStringConverter.class)
       private LocalDateTime time;
   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to