From: Tom Lane <tgl@sss.pgh.pa.us>
To: Norman Yamada <nyamada@millburncorp.com>
Cc: pgsql-interfaces@postgresql.org, Yasser El-Zein <yelzein@millburncorp.com>
Subject: Re: getting julian number from date in libpq
Date: Thu, 08 Sep 2005 15:45:06 -0400
Message-ID: <24865.1126208706@sss.pgh.pa.us> (raw)
In-Reply-To: <7D1583CD-3DEC-4F01-BF07-6599B7AEF38B@millburncorp.com>
References: <7D1583CD-3DEC-4F01-BF07-6599B7AEF38B@millburncorp.com>
Norman Yamada <nyamada@millburncorp.com> writes:
> Postgresql stores dates as Julian days, but using libpq, I don't see
> how to get out a date quickly as a julian day. If I use PQgetvalue,
> my date is automagically converted into whatever my DATESTYLE is at
> the time. How can I just get out the internal julian date?
Something involving EXTRACT(EPOCH FROM timestamp) will probably solve
your problem.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: tgl@sss.pgh.pa.us, nyamada@millburncorp.com, yelzein@millburncorp.com
Subject: Re: getting julian number from date in libpq
In-Reply-To: <24865.1126208706@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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