## Syntax ```mermaid %%{init: { 'theme': 'base', 'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' }, 'themeVariables': { 'fontSize': '11px', 'fontFamily': 'Arial' } }}%% flowchart LR Start((START)) --> FROM_UNIXTIME[FROM_UNIXTIME]:::quoted FROM_UNIXTIME --> End((END)) ``` ## Purpose The `FROM_UNIXTIME` SQL function gets the date/time from a number representing the seconds relative to start of UNIX epoch time on January 1, 1970. Values before January 1, 1 (UNIX epoch time -62135593200) and on or after January 1, 10000 (UNIX epoch time 253402300799) return an error. Parameters: - Input (`long`): seconds relative to start of UNIX epoch time. Returns: the date/time which the UNIX epoch time represents as a `datetime`. ## Examples The following example retrieves the date for UNIX epoch time 0: ```sql select to_char(from_unixtime(0), 'YYYYMMDD') ------------------- 19700101 ``` The following example retrieves the date/time for one second before year 10000: ```sql select to_char(from_unixtime(253402300799), 'YYYYMMDDHH24MISS') ------------------- 99991231235959 ```