Thread: Timestamp

Timestamp

From
Igor Roboul
Date:
Hello,
How to get value of 'timestamp' type field into C program?
For example for varchar(x) I use v = PQgetvalue(r,0,0) and now
v is pointer to nullterminated string.
For integer: i = PQgetvalue(r,0,1) and now i contains value
of integer field.
But with timestamp? How to translate returned value into time_t?

I could not find this in documentation (in aw_pgsql_book and in manual
pages). I have installed postgresql-7.0.2 using FreeBSD port.

--
Igor Roboul, Unix System Administrator & Programmer @ sanatorium "Raduga",
Sochi, Russia
http://www.brainbench.com/transcript.jsp?pid=304744