Hi guys,
You were right, there was something wrong with my original query:
SELECT cast(tasks_start as date) FROM "tasks" WHERE (Date(tasks_start) in
> ('2016-08-10');
I was able to get the expected data using the above query...
Cheers
Patrick
Try using double colon opperator instead of cast().
E. g. task_start::date
Regards,
Amul
Sent from a mobile device. Please excuse brevity and tpyos.
On Mon, 5 Sep, 2016 at 8:29 am, Patrick
2016-09-05 15:17 GMT+12:00 Patrick B :
>
>> You might want to share the version of PostgreSQL you are using.
>>
>> You might want to try date_trunc and AT TIMEZONE function/operators-
>>
>> https://www.postgresql.org/docs/9.4/static/functions-datetim
>> e.html#FUNCTIONS-DATETIME-TRUNC
>>
>> SELECT
2016-09-05 5:17 GMT+02:00 Patrick B :
>
>> You might want to share the version of PostgreSQL you are using.
>>
>> You might want to try date_trunc and AT TIMEZONE function/operators-
>>
>> https://www.postgresql.org/docs/9.4/static/functions-datetim
>> e.html#FUNCTIONS-DATETIME-TRUNC
>>
>> SELECT
>
>
> You might want to share the version of PostgreSQL you are using.
>
> You might want to try date_trunc and AT TIMEZONE function/operators-
>
> https://www.postgresql.org/docs/9.4/static/functions-
> datetime.html#FUNCTIONS-DATETIME-TRUNC
>
> SELECT date_trunc('day', tasks_start at TIME ZONE 'E
Patrick B writes:
> I'm trying to cast the date, using this query:
>> SELECT cast(tasks_start as date) FROM "jobs" WHERE "tasks"."deleted" = 'f'
>> AND "tasks"."recurrence_id" = 1 AND (Date(tasks_start) in ('2016-08-10')
> but it doesn't work.. I get 0 rows... what am I doing wrong?
Are you sure
On Mon, Sep 5, 2016 at 10:59 AM Patrick B wrote:
> Hi guys,
>
> I got the tasks table that has the tasks_start column:
>
>> tasks_start| timestamp(3) without time zone
>
>
>
> select tasks_start from tasks LIMIT 1;
>
>> tasks_start
>> ---
>> 2016-08-10 00:30:00
>
>
> I'm