AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Data Studio
2.6K members online now
2.6K members online now
Ask questions about Data Studio
Guide Me
star_border
Reply

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?


Thanks