Skip site navigation (1) Skip section navigation (2)

Date/Time atributes and binary cursors

From: "Gonalo Marrafa" <gjm(at)uevora(dot)pt>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Date/Time atributes and binary cursors
Date: 2004-04-02 14:51:10
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
Hi there.

I'm trying to read a timestamp without timezone attribute, using binary cursors. I can read the data but i don't know what to do with it. I would like to convert it to a time_t or tm struct. How can i do this?

I'm using postgresql 7.4 on Debian sid.

Here's a snippet of the code i'm using:

#include <postgresql/pgtypes_timestamp.h>
timestamp *ts; ts = (timestamp *) PQgetvalue(res, i, f_num);

I would like to use date attributes too.

Thanks in advance.

Gonçalo Marrafa <gjm(at)uevora(dot)pt>


pgsql-interfaces by date

Next:From: Tom LaneDate: 2004-04-02 15:33:40
Subject: Re: BEGIN-cascade blocks application
Previous:From: Christoph HallerDate: 2004-04-02 12:32:04
Subject: BEGIN-cascade blocks application

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group