I am trying to calculate the time difference in seconds between CONNECTTIMESTAMP and DISCONNECTTIMESTAMP. Both are “timetype”. I use the following: TIMESTAMPDIFF(SECOND, “DISCONNECTTIMESTAMP”, “CONNECTTIMESTAMP”). I only get an “unexpected error”. Any ideas what “Unexpected error occurred” means?
If you click on jobs, you should see a download profile on the right bottom of the screen. Can you please send us the downloaded zip file? That should give us more information
- Query Type:UI (preview)
- Start Time:08/14/2018 07:54:03
- End Time:08/14/2018 07:54:03
- Job ID:248d2103-c6d4-0c64-fbb9-90b5bc6f2800
IllegalStateException: Value at index is null
SELECT CONNECTTIMESTAMP, TIMESTAMPDIFF(SECOND, “CONNECTTIMESTAMP”, “DISCONNECTTIMESTAMP”) AS new_field, DISCONNECTTIMESTAMP
SELECT CONNECTTIMESTAMP, DISCONNECTTIMESTAMP
FROM Yiptel.zultys_cdr_for_byu.session AS session
Hi, @rhanks !
Try to truncate both timestamps to seconds before “TIMESTAMPDIFF”
It was helpful in my case.