Re: how to convert float to timestamp in single select query - Mailing list pgsql-general

From Adrian Klaver
Subject Re: how to convert float to timestamp in single select query
Date
Msg-id 551BF597.6040006@aklaver.com
Whole thread Raw
In response to how to convert float to timestamp in single select query  (Maulik Shah <mauliks@rosconsultancy.in>)
List pgsql-general
On 03/29/2015 08:52 PM, Maulik Shah wrote:
> Dear Sir/Madam
>
>
> how to convert float to timestamp in single select query
>
> for exp. i have float as 1.251152515236 ,

test=> select to_timestamp(1.251152515236);
          to_timestamp
-------------------------------
  1969-12-31 16:00:01.251153-08


The above assumes your value is seconds since epoch, which I am pretty
sure is not the case here.

>
> i want to convert this to datetime and from datetime to timestamp...
> i.e. 02:22:044456

Well the above is a time not a datetime or timestamp, so I am not really
sure what you are after? In other words more context is needed about
where the value is coming from and what other information is available
to anchor it to a datetime.

>
> I need sql query
>
>
> It is actually .crd file made in xml , and i have query inside xml like
>
>
> <![CDATA[
> SELECT USER.LastName, USER.fltime from Tbalname
>
>
> ]>
>
>
>
> fltime has float value which i need to convert to time
>
>
> Regards
> Maulik Shah
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: Bill Moran
Date:
Subject: Re: Would like to know how analyze works technically
Next
From: Adrian Klaver
Date:
Subject: Re: stack builder