Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm trying to group my datetimes to 1 record for each day.
I found someting with timestamp and date(datetime, 'YYYY-MM-DD') but it's not working so far.
My query is:
LOAD "vessel_id",
name as Route,
datetime as "Date";
SQL SELECT "vessel_id",
name,
datetime
FROM route
You need to knock the decimal off your timestamp with the floor() function, something like :
date(floor(datetime), 'YYYY-MM-DD')
Hi,
Try this expression
LOAD "vessel_id",
name as Route,
Date(datetime, 'YYYY-MM-DD') as "Date";
SQL SELECT "vessel_id",
name,
datetime
FROM route
Regards
Anand
You need to knock the decimal off your timestamp with the floor() function, something like :
date(floor(datetime), 'YYYY-MM-DD')
Hello,
Thank you, this is working so far!
Now i want to group the table by the dates + name. When i do group by datetime, name, "vessel_id" it doesn't work.
Works great, even the group by works here. Thank you!