On Sun, Mar 29, 2015 at 8:52 PM, Maulik Shah <maul...@rosconsultancy.in> wrote:
> Dear Sir/Madam > > > how to convert float to timestamp in single select query > > for exp. i have float as 1.251152515236 , > > i want to convert this to datetime and from datetime to timestamp... > i.e. 02:22:044456 > You imply that (float) 1.251152515236 is equal to (time) 02:22:044456 I have no clue what formula: f(x) = ?x? would satisfy f(1.251152515236) = '02:22:044456'::time Once you answer that you can either inline said formula or create a user-defined function to encapsulate it. See the documentation for the how. David J.