Hi Andrew,
In Advanced SQL, the syntax varies if you're using SQL Server, MySQL or Oracle.
For instance, if you're using SQL Server, the syntax is DATEDIFF( date_part , start_date , end_date) where the date_part defines if you're looking for the difference in days, minutes, etc.
For instance,
SELECT DATEDIFF(hh, {User_Extendend}.[LoginStartDate], {User_Extended}.[LoginEndDate]) FROM {User_Extended} would give you the difference in hours.
Here you can find examples and the possible values for the date_part.
Regards,
João