SELECT `justfunctions.eu.seconds_to_timestamp`(1687613655)
/*--Output--
2023-06-24 13:00:01 UTC
*/
CREATE OR REPLACE FUNCTION `your_project_id.your_dataset_id.seconds_to_timestamp`(`seconds` INT64)
RETURNS TIMESTAMP AS (TIMESTAMP(FORMAT_TIMESTAMP('%Y-%m-%d %H:%M:%S', TIMESTAMP_SECONDS(seconds))))
OPTIONS ( description = '''Converts <seconds> to timestamp format '%Y-%m-%d %H:%M:%S'.''')
SQL User Defined Function (SQL UDF)
See something wrong? Contact us or report an issue on Github.