From: | amulsul <sul_amul(at)yahoo(dot)co(dot)in> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Get date timestamp(3) without time zone column - PGSQL 9.5 |
Date: | 2016-09-05 03:43:26 |
Message-ID: | 978886992.1097944.1473046983563@mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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 Baker [via PostgreSQL]<ml-node+s1045698n5919421h53(at)n3(dot)nabble(dot)com> 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 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?
cheersPatrick
If you reply to this email, your message will be added to the discussion below: http://postgresql.nabble.com/Get-date-timestamp-3-without-time-zone-column-PGSQL-9-5-tp5919421.html To start a new topic under PostgreSQL - general, email ml-node+s1045698n1843780h82(at)n3(dot)nabble(dot)com
To unsubscribe from PostgreSQL - general, click here.
NAML
--
View this message in context: http://postgresql.nabble.com/Get-date-timestamp-3-without-time-zone-column-PGSQL-9-5-tp5919421p5919430.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
From | Date | Subject | |
---|---|---|---|
Next Message | Nguyễn Trần Quốc Vinh | 2016-09-05 06:20:49 | Re: Materialized view auto refresh |
Previous Message | Lucas Possamai | 2016-09-05 03:37:19 | Re: Get date timestamp(3) without time zone column - PGSQL 9.5 |