SELECT `justfunctions.eu.seconds_to_date`(1687613655)
/*--Output--
2023-06-24
*/
CREATE OR REPLACE FUNCTION `your_project_id.your_dataset_id.seconds_to_date`(`seconds` INT64)
RETURNS DATE AS (DATE(FORMAT_DATE('%Y-%m-%d',TIMESTAMP_SECONDS(seconds))))
OPTIONS ( description = '''Converts <seconds> to date format '%Y-%m-%d'.''')
SQL User Defined Function (SQL UDF)
See something wrong? Contact us or report an issue on Github.