timestamp,bool,date with PQgetvalue - Mailing list pgsql-interfaces

From Raghu Bhai Chalasani
Subject timestamp,bool,date with PQgetvalue
Date
Msg-id Pine.GSO.4.21.0102282037430.2589-100000@rac3.wam.umd.edu
Whole thread Raw
List pgsql-interfaces
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 timestamps = PQgetvalue(...);
string dates = PQgetvalue(...);
string bools = PQgetvalue(...);
cout << "TimeStamp: " << timestamps << endl;
cout << "Date: " << dates << endl;
cout << "Bool: " << bools << endl;
I am getting some junk value. I have looked at all the manuals online and
searched on internet but couldn't find anything.
I want the 'timestamps' or 'dates' or 'bools' to have the string format as
in database... so if the database has
update_timestamp                   date                  bool
-------------------------------------------------------------
02/28/2001 19:43:22.00 EST|   02/28/2001             | t                                 

I want:
'timestamps' = '02/28/2001 19:43:22.00 EST';
'dates'      = '02/28/2001';
'bools'      = 't';
How can I do that?
Can someone please shed some light on me about it? :-)
Thanks,
Raghu Chalasani                                                                          



pgsql-interfaces by date:

Previous
From: aong
Date:
Subject: pgaccess
Next
From: "luis alfonso collazos vargas"
Date:
Subject: ...