REFERENCE
U.CONVERT_DATETIME
Summary
Returns the Windows Timezone ID setting for the machine or a report of all Windows timezones. Always recalculates once when workbook is opened unless report is shown
Syntax
Parameters
| Parameter | Required | Description |
|---|---|---|
datetime |
Yes | The Excel datetimes to be converted |
to |
Yes | The timezone to which the datetime should be converted, either a Windows Timezone ID, location, "UTC" or "Local". If not provided, then assumed to be the current machine's time unless the "from" parameter is set to the current machine's timezone in which case UTC is assumed. Set to "iso_8601( |
[from] |
No | The timezone of the datetime provided, either a Windows Timezone ID, location, "UTC" or "Local". If not provided, then assumed to be the current machine's time unless the "to" parameter is set to the current machine's timezone in which case UTC is assumed. If a 2nd column with value TRUE is provided, then any timezone indication in a datetime string will be used instead of the specified "from" location |
[return_input_if_error] |
No | If set to TRUE then any input that cannot be converted will be returned as is instead of an Excel #VALUE! error |
Behavior
The documented public interface is supported by the current U Add-in source signature and the maintained Usage Examples workbook. Optional parameters are shown in square brackets in the syntax above; omit the brackets when entering a formula.
Return Value
Returns the function result or action status described by the formula and parameters above. The maintained sources do not define a narrower, stable return contract for this function.
Examples
Notes
- Formula examples are preserved from maintained workbook usage and normalized to the current
U.prefix. - Complete formulas demonstrate working patterns; they do not imply that undocumented option values are supported.
- Where maintained sources do not specify every accepted value, default, or error message, this page does not infer one.
- For functions that perform actions, use a visible trigger or supported block/throttle parameter to avoid unintended repetition during recalculation.
Related
- Concept: Live Data and RTD Updates
- Concept: Caching and Throttling
- How-to: Throttle Updates
- Example: Throttled Live Dashboard