DateTimeRenderOption
Determines how dates should be rendered in the output.
Enums |
SERIAL_NUMBER |
Instructs date, time, datetime, and duration fields to be output as doubles in "serial number" format, as popularized by Lotus 1-2-3. The whole number portion of the value (left of the decimal) counts the days since December 30th 1899. The fractional portion (right of the decimal) counts the time as a fraction of the day. For example, January 1st 1900 at noon would be 2.5, 2 because it's 2 days after December 30th 1899, and .5 because noon is half a day. February 1st 1900 at 3pm would be 33.625. This correctly treats the year 1900 as not a leap year. |
FORMATTED_STRING |
Instructs date, time, datetime, and duration fields to be output as strings in their given number format (which depends on the spreadsheet locale). |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-03 UTC.
[null,null,["Last updated 2024-09-03 UTC."],[[["Controls the rendering of dates in output, offering two distinct methods: `SERIAL_NUMBER` and `FORMATTED_STRING`."],["`SERIAL_NUMBER` outputs dates as doubles, representing the number of days since December 30th, 1899, with the fractional portion indicating the time of day."],["`FORMATTED_STRING` outputs dates as strings, formatted according to the spreadsheet's locale settings."]]],["The content defines how dates, times, datetimes, and durations are output. `SERIAL_NUMBER` outputs these as doubles, with the whole number representing days since December 30th, 1899, and the fraction representing the time as a portion of the day. `FORMATTED_STRING` outputs these fields as strings based on the spreadsheet's locale-specific number format. Both enums define different formats for the given fields.\n"]]