Re: getting julian number from date in libpq - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: getting julian number from date in libpq
Date
Msg-id 24865.1126208706@sss.pgh.pa.us
Whole thread Raw
In response to getting julian number from date in libpq  (Norman Yamada <nyamada@millburncorp.com>)
List pgsql-interfaces
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


pgsql-interfaces by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: getting julian number from date in libpq
Next
From: Norman Yamada
Date:
Subject: Re: getting julian number from date in libpq