Hi
i am developing windows c++ application using libpq. i am using binary cursor to select table data.
how do i retrieve timestamp data from table? how can i convert it to time_t or struct tm?
char* val = PQgetvalue(pgres,i,j);
for numbers code looks like that:
nVal = * ((int *) val);
for timestamp i tryied this code:
#include "postgres.h"
#include "utils/timestamp.h"
.....
tmstampVal = * (Timestamp*) val;
timestamp2tm(tmstampVal, &tzp, &sttm, &fsec, (char**)&tzn);
.....
but then compiling program i got error:
error LNK2001: unresolved external symbol "int __cdecl timestamp2tm(double,int *,struct tm *,double *,char * *)" (?timestamp2tm@@YAHNPAHPAUtm@@PANPAPAD@Z)
what am i doing wrong?
thanx
Egidijus