pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedtimestamp & graph time scale
2+ messages / 2 participants
[nested] [flat]
* timestamp & graph time scale
@ 2005-06-13 10:35 santosh dwivedi <mwanaag@yahoo.com>
0 siblings, 1 reply; 2+ messages in thread
From: santosh dwivedi @ 2005-06-13 10:35 UTC (permalink / raw)
To: pgsql-jdbc
Hi All,
This is my very basic question.
I have follwing table in database.
result_time | epoch | nodeid | light |
parent | voltage
----------------------------+-------+--------+-------+--------+---------
2004-12-09 16:44:43.501375 | 1 | | |
|
2004-12-09 16:44:43.564375 | 2 | 10 | 362 |
0 | 479
2004-12-09 16:44:43.626375 | 3 | 10 | 408 |
0 | 478
2004-12-09 16:44:43.689375 | 4 | 10 | 429 |
0 | 478
2004-12-09 16:44:43.751375 | 5 | 10 | 438 |
I need to plot the light Vs Time.
For plotiing the data I am using G2Dint java API. To
plot time on x axis I need to convert time to some
integer value (suppose I choose x-axis scale in
minute)
How can I convert Timestamp time to an integer minute.
As my database is having data over months of period,
actually I need to plot values Vs time. Is there any
Idea so that I can plot light Vs time ( and can show
date along with time). IFAIK G2Dint takes float or
integer values to plot them along x axis and y axis.
How can I show the time on X axis (with date).
Thanks for help.
Regards:
santosh dwivedi
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: timestamp & graph time scale
@ 2005-06-13 14:34 Tom Lane <tgl@sss.pgh.pa.us>
parent: santosh dwivedi <mwanaag@yahoo.com>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2005-06-13 14:34 UTC (permalink / raw)
To: santosh dwivedi <mwanaag@yahoo.com>; +Cc: pgsql-jdbc
santosh dwivedi <mwanaag@yahoo.com> writes:
> For plotiing the data I am using G2Dint java API. To
> plot time on x axis I need to convert time to some
> integer value
I'd suggest "EXTRACT(EPOCH FROM result_time)"
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2005-06-13 14:34 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-06-13 10:35 timestamp & graph time scale santosh dwivedi <mwanaag@yahoo.com>
2005-06-13 14:34 ` Tom Lane <tgl@sss.pgh.pa.us>
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