Re: How to convert a text variable into a timestamp in postgreSQL? - Mailing list pgsql-general

From David G. Johnston
Subject Re: How to convert a text variable into a timestamp in postgreSQL?
Date
Msg-id CAKFQuwZg7STg5ho=qu0qHEvn7bZv1y-4v+nZsaKPcbDUCbSepA@mail.gmail.com
Whole thread Raw
In response to How to convert a text variable into a timestamp in postgreSQL?  (litu16 <litumelendez@gmail.com>)
List pgsql-general
On Friday, June 26, 2015, litu16 <litumelendez@gmail.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.

pgsql-general by date:

Previous
From: ZM Yang
Date:
Subject: Question about CONSTRAINT TRIGGER
Next
From: "David G. Johnston"
Date:
Subject: Re: Question about CONSTRAINT TRIGGER