pg.ddx.io pgsql-odbc@postgresql.org mailing list archive
help / color / mirror / Atom feedHelp with casting timestamp column
4+ messages / 3 participants
[nested] [flat]
* Help with casting timestamp column
@ 2004-06-10 17:37 Chris Hoover <revoohc@sermonaudio.com>
0 siblings, 1 reply; 4+ messages in thread
From: Chris Hoover @ 2004-06-10 17:37 UTC (permalink / raw)
To: pgsql-odbc
I need a bit of help. I have a table full of database stats that are
all timestamped using the now() timestamp. However, I need to pull some
consolidated reports that are based upon hourly activiy. Does anyone
know of a way to get a timestamp column to return as mm/dd/yyyy hh?
Thanks for any help,
chris
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Help with casting timestamp column
@ 2004-06-10 18:00 Chris Gamache <cgg007@yahoo.com>
parent: Chris Hoover <revoohc@sermonaudio.com>
0 siblings, 0 replies; 4+ messages in thread
From: Chris Gamache @ 2004-06-10 18:00 UTC (permalink / raw)
To: Chris Hoover <revoohc@sermonaudio.com>; pgsql-odbc
select to_char(my_timestamp,'MM/DD/YYYY HH') from t;
returns a string representation of the timestamp...
HTH,
CG
--- Chris Hoover <revoohc@sermonaudio.com> wrote:
> I need a bit of help. I have a table full of database stats that are
> all timestamped using the now() timestamp. However, I need to pull some
> consolidated reports that are based upon hourly activiy. Does anyone
> know of a way to get a timestamp column to return as mm/dd/yyyy hh?
>
> Thanks for any help,
>
> chris
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
__________________________________
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Help with casting timestamp column
@ 2004-06-10 18:02 Janet Borschowa <borschow@roguewave.com>
0 siblings, 0 replies; 4+ messages in thread
From: Janet Borschowa @ 2004-06-10 18:02 UTC (permalink / raw)
To: Chris Hoover <revoohc@sermonaudio.com>; pgsql-odbc
Check out the EXTRACT and date_part functions. See the PostgreSQL User's
Guide for more information.
-- Janet
> -----Original Message-----
> From: Chris Hoover [mailto:revoohc@sermonaudio.com]
> Sent: Thursday, June 10, 2004 10:38 AM
> To: pgsql-odbc@postgresql.org
> Subject: [ODBC] Help with casting timestamp column
>
>
> I need a bit of help. I have a table full of database stats that are
> all timestamped using the now() timestamp. However, I need
> to pull some
> consolidated reports that are based upon hourly activiy. Does anyone
> know of a way to get a timestamp column to return as mm/dd/yyyy hh?
>
> Thanks for any help,
>
> chris
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 8: explain analyze is your friend
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Help with casting timestamp column
@ 2004-06-10 18:03 Janet Borschowa <borschow@roguewave.com>
0 siblings, 0 replies; 4+ messages in thread
From: Janet Borschowa @ 2004-06-10 18:03 UTC (permalink / raw)
To: Chris Hoover <revoohc@sermonaudio.com>; pgsql-odbc
See also the function to_char.
-- Janet
> -----Original Message-----
> From: Chris Hoover [mailto:revoohc@sermonaudio.com]
> Sent: Thursday, June 10, 2004 10:38 AM
> To: pgsql-odbc@postgresql.org
> Subject: [ODBC] Help with casting timestamp column
>
>
> I need a bit of help. I have a table full of database stats that are
> all timestamped using the now() timestamp. However, I need
> to pull some
> consolidated reports that are based upon hourly activiy. Does anyone
> know of a way to get a timestamp column to return as mm/dd/yyyy hh?
>
> Thanks for any help,
>
> chris
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 8: explain analyze is your friend
>
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2004-06-10 18:03 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-06-10 17:37 Help with casting timestamp column Chris Hoover <revoohc@sermonaudio.com>
2004-06-10 18:00 ` Chris Gamache <cgg007@yahoo.com>
2004-06-10 18:02 Re: Help with casting timestamp column Janet Borschowa <borschow@roguewave.com>
2004-06-10 18:03 Re: Help with casting timestamp column Janet Borschowa <borschow@roguewave.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox