Re: How to convert a text variable into a timestamp in postgreSQL?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: litu16 <litumelendez(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to convert a text variable into a timestamp in postgreSQL?
Date: 2015-06-27 02:13:53
Message-ID: CAKFQuwZg7STg5ho=qu0qHEvn7bZv1y-4v+nZsaKPcbDUCbSepA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Friday, June 26, 2015, litu16 <litumelendez(at)gmail(dot)com> wrote:

> I know how to convert a text to timestamp in postgreSQL using
>
> * SELECT to_timestamp('05 Dec 2000', 'DD Mon YYYY')*
>
> but how can I convert a text variable (inside a function) to timestamp??
>
>
Generally, just try casting it.

textvarname::date

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2015-06-27 02:23:30 Re: Question about CONSTRAINT TRIGGER
Previous Message ZM Yang 2015-06-27 00:24:21 Question about CONSTRAINT TRIGGER