Re: Function to convert bigint to date

From: "Pradeepkumar, Pyatalo (IE10)" <Pradeepkumar(dot)Pyatalo(at)honeywell(dot)com>
To: Steven Klassen <sklassen(at)commandprompt(dot)com>, "Pradeepkumar, Pyatalo (IE10)" <Pradeepkumar(dot)Pyatalo(at)honeywell(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Function to convert bigint to date
Date: 2004-10-25 09:23:19
Message-ID: 77ED2BF75D59D1439F90412CC5B10974139AD642@ie10-sahara.hiso.honeywell.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


Hi,
But from the result I need to display only the date and not the time. Should
I use extract() function to get the day, month and year seperately and then
form the date format, or is there any other way to extract only the date
part from the timestamp.

Regs,
Pradeep

-----Original Message-----
From: pgsql-novice-owner(at)postgresql(dot)org
[mailto:pgsql-novice-owner(at)postgresql(dot)org] On Behalf Of Steven Klassen
Sent: Thursday, October 21, 2004 9:48 PM
To: Pradeepkumar, Pyatalo (IE10)
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: [NOVICE] Function to convert bigint to date

* Pradeepkumar, Pyatalo (IE10) <Pradeepkumar(dot)Pyatalo(at)honeywell(dot)com>
[2004-10-21 07:47:21 -0700]:

> But how do I convert the BIGINT to the date format 'dd mm yyyy' a
> function similar to to_date(text,text)

This reply from Richard Huxton should do the trick:

http://archives.postgresql.org/pgsql-sql/2002-07/msg00397.php

--
Steven Klassen - Lead Programmer
Command Prompt, Inc. - http://www.commandprompt.com/ PostgreSQL Replication
& Support Services, (503) 667-4564

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Steven Klassen 2004-10-25 14:00:40 Re: sql interogation
Previous Message cristivoinicaru 2004-10-25 08:05:22 sql interogation