79740334

Date: 2025-08-19 19:41:08
Score: 1
Natty:
Report link

I had to do a nested query and cast entry_date as an INT64 twice. If I didn't the message would read "No matching signature for function TIMESTAMP_SECONDS Argument types: FLOAT64 Signature: TIMESTAMP_SECONDS(INT64) Argument 1: Unable to coerce type FLOAT64 to expected type INT64."

The code is below.

select 
  individual, 
  date(TIMESTAMP_SECONDS(entry_sec)) as entry_date_converted

  from(
    select *,
    cast(cast(entry_date as int64)/1000000000 as int64) as entry_sec
    from table 

  )
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Connor Hill