TIMEOFDAY fields are not supported at least as far...
# suiteql
n
TIMEOFDAY fields are not supported at least as far as I can see in the docs and conversations with others. However, not entirely true. Whilst they don't appear in lists in Analytics you can, in a query string, reference them such:
Copy code
BUILTIN_RESULT.TYPE_DATETIME(CUSTOMRECORD_STA_EMPLOYEE_REGISTER.custrecord_sta_emp_regi_shift_start) AS shift_start,
In Analytics, on a Dataset, you can use a formula... I have tried to extract the time difference between two of these fields and this is the only valid formula of maaaaaany that I've tried that "validates"
Copy code
(
  (EXTRACT(HOUR FROM {custrecord_sta_emp_regi_shift_end}) * 3600 +
   EXTRACT(MINUTE FROM {custrecord_sta_emp_regi_shift_end}) * 60 +
   EXTRACT(SECOND FROM {custrecord_sta_emp_regi_shift_end}))
  -
  (EXTRACT(HOUR FROM {custrecord_sta_emp_regi_shift_start}) * 3600 +
   EXTRACT(MINUTE FROM {custrecord_sta_emp_regi_shift_start}) * 60 +
   EXTRACT(SECOND FROM {custrecord_sta_emp_regi_shift_start}))
)
However, it throws an error: "There was a problem loading your data. Please refine your query or try again later." If I plug this in to a query string and run it using the Query Tool it hates it. Does anyone know any funky way to achieve what I'm attempting? (seconds difference between two TIMEOFDAY fields) Incidentally the output without the formula looks like the attached image. I can of course just write a function in my script to extract the time difference but it seems a shame! 😄