getting julian number from date in libpq

From: Norman Yamada <nyamada(at)millburncorp(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Cc: Yasser El-Zein <yelzein(at)millburncorp(dot)com>
Subject: getting julian number from date in libpq
Date: 2005-09-08 18:12:33
Message-ID: 7D1583CD-3DEC-4F01-BF07-6599B7AEF38B@millburncorp.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

We're trying to convert dates properly for R.

R stores dates internally as integers, using Unix date style --
starting date is January 1, 1970.

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? I could
use this to convert to R dates much easier than using an ISO date
format.

Thanks for any help.

######################################################################
This e-mail is confidential and should not be redistributed or
forwarded by the recipient. The information contained in this e-mail
message is intended only for the use of the individual or entity named
above. If the reader of this message is not the intended recipient or
you have received this communication in error, please immediately
notify us by telephone. Receipt by anyone other than the intended
recipient is not a waiver of any work-product or, if applicable,
attorney-client privilege.

This e-mail does not constitute an offering of any security. Such an
offering may only be made by means of a private placement memorandum
or other disclosure document. Nothing in this e-mail constitutes
investment advice. Past performance is not indicative of future
results. All e-mail to and from Millburn Ridgefield Corporation and
its affiliates is monitored, stored and made available to regulators
if requested.
######################################################################

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Michael Fuhr 2005-09-08 19:37:43 Re: getting julian number from date in libpq
Previous Message Teunis Peters 2005-09-06 19:42:35 Mac OS X - ssl corruption problems (libpq)