toExcelTime
The toExcelTime
method converts a date-time to an Excel time represented as a double.
Syntax
toExcelTime(instant, timeZone)
toExcelTime(dateTime)
Parameters
Parameter | Type | Description |
---|---|---|
instant | Instant | The Instant to convert. |
timeZone | ZoneId | The time zone. |
dateTime | ZonedDateTime | The zoned date-time to convert. |
Returns
An Excel time.
Examples
println toExcelTime(now(), timeZone("UTC"))
- Log