## Syntax ```mermaid %%{init: { 'theme': 'base', 'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' }, 'themeVariables': { 'fontSize': '11px', 'fontFamily': 'Arial' } }}%% flowchart LR Start((START)) --> | | CONVERTNUMERICTOTIME[CONVERTNUMERICTOTIME]:::quoted CONVERTNUMERICTOTIME --> End((END)) ``` ## Purpose The `CONVERTNUMERICTOTIME` SQL function converts a number of hours to a text presentation of the time. Parameters: - Input (`decimal`): number to be converted to time. - Show Seconds (`boolean`, optional): whether to show seconds. - Zero Change (`boolean`, optional): when enabled and input is 0, shows value of Zero Text parameter. - Zero Text (`varchar2`, optional): text to display when input is 0 and Zero Change is true. - Show Days (`boolean`, optional): whether to show days. Returns: the trimmed text as `varchar2`. ## Examples The following example retrieves the text representation of 1234 hours: ```sql select convertnumerictotime(1234) ---------------- 51 Days 10:00 ``` The following example retrieves the text representation of 1234.5 hours without grouping days: ```sql select convertnumerictotime(1234.5, false, true, 'none', false) ---------------- 1.234:30 ``` The following example retrieves the text representation of zero hours: ```sql select convertnumerictotime(0, false, true, 'none', false) ---------------- none ``` The following example retrieves the text representation of 65 seconds including sub-minute accuracy: ```sql select convertnumerictotime(65 / 86400, true) ---------------- 0:00:02 ```