From: | czezz <czezz(at)o2(dot)pl> |
---|---|
To: | =?UTF-8?Q?Scott_Ribe?=<scott_ribe(at)elevated-dev(dot)com> |
Cc: | =?UTF-8?Q?Albe_Laurenz?=<laurenz(dot)albe(at)wien(dot)gv(dot)at>, pgsql-admin(at)postgresql(dot)org |
Subject: | Re: display to_timestamp in quotas or convert to char ? |
Date: | 2015-05-05 14:21:08 |
Message-ID: | 79bfc5f9.244b3aa3.5548d1d4.9c8af@o2.pl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
This is because this query is executed/hardcoded in application.
And by executing it like this I can prove devs that there is a problem.
Dnia 5 maja 2015 15:56 Scott Ribe <scott_ribe(at)elevated-dev(dot)com> napisał(a):
> On May 5, 2015, at 7:24 AM, czezz <czezz(at)o2(dot)pl> wrote:
> >
> > have already tried to convert timestamp to char like you suggested but that lead to another error.
> >
> > First, simply execution with NO conversion - to make sure it works like that:
> > Server2=# select to_timestamp('2015-05-04 22:13:14.000', 'YYYY/MM/DD-HH24:MI:SS.FF3');
> > to_timestamp
> > ------------------------
> > 2015-05-04 22:13:14+02
> > (1 row)
> >
> > Secondly, to_char():
> > Server2=# select to_char(to_timestamp('2015-05-04 22:13:14.000', 'YYYY/MM/DD-HH24:MI:SS.FF3'));
> > ERROR: function to_char(timestamp with time zone) does not exist
> > LINE 1: select to_char(to_timestamp('2015-05-04 22:13:14.000', 'YYYY...
> > ^
> > HINT: No function matches the given name and argument types. You might need to add explicit type casts.
> >
> > And this HINT seems to be odd.
>
> WHY are you still trying to convert to_char??? Convert the varchar field to_timestamp and be done with it.
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Ribe | 2015-05-05 14:47:38 | Re: display to_timestamp in quotas or convert to char ? |
Previous Message | Scott Ribe | 2015-05-05 13:56:12 | Re: display to_timestamp in quotas or convert to char ? |