Data Studio
1.8K members online now
1.8K members online now
Ask questions about Data Studio
Guide Me

Calculate age in Data Studio

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I'm trying to calculate the age of something in data studio, for instance a youtube video.


The sample code is:


DATE_DIFF(TODATE(end_time, 'NANOS', '%Y-%m-%d'), TODATE(start_time, 'MICROS', '%Y%m%d'))


which does not work (kicks an error). Any ideas on how this can be done?