Thread: get Timestamp with PQgetvalue()...

get Timestamp with PQgetvalue()...

From
Raghu Bhai Chalasani
Date:
Hi,

I am trying to get the Timestamp in const char * format with PQgetvalue
but I am unsuccesful in doing that. When I did:

string s = PQgetvalue(connection.result, 0,2);
cout << "TimeStamp: " << s << endl;

I am getting some junk value. I have looked at all the manuals online and
searched on internet but couldn't find anything. Can someone please shed
some light on me about it? :-)

Thanks,
Raghu Chalasani



Re: get Timestamp with PQgetvalue()...

From
Peter Eisentraut
Date:
Raghu Bhai Chalasani writes:

> I am trying to get the Timestamp in const char * format with PQgetvalue
> but I am unsuccesful in doing that. When I did:
>
> string s = PQgetvalue(connection.result, 0,2);
> cout << "TimeStamp: " << s << endl;

char * s = PGgetvalue(...);

>
> I am getting some junk value. I have looked at all the manuals online and
> searched on internet but couldn't find anything. Can someone please shed
> some light on me about it? :-)
>
> Thanks,
> Raghu Chalasani
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>
>

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/