I have been trying to work this out all week. I have a table with values names start and finish. I need a Postgres query to relay the hours back to me in a nice format.
The original (before hours) query is this
select * from public.volass
where linkedass=$request_id
order by start
So when I try and use DiffDate I make it look like
select datediff(hours,start,finish), * from public.volass
where linkedass=$request_id
order by start
Postgres then gives me the following error.
ERROR: column "hours" does not exist
LINE 1: select datediff(hours,start,finish), * from public.volass
^
********** Error **********
ERROR: column "hours" does not exist
SQL state: 42703
Character: 17
- Do I need to have a field named "Hours" in the system for this to work
- Even if I add a field named "hours" it still stuffs up
- Can you steer me in the correct direction to use Difdate