From: | Raghu Bhai Chalasani <chalasar(at)wam(dot)umd(dot)edu> |
---|---|
To: | pgsql-interfaces(at)postgresql(dot)org |
Subject: | timestamp,bool,date with PQgetvalue |
Date: | 2001-03-01 01:38:53 |
Message-ID: | Pine.GSO.4.21.0102282037430.2589-100000@rac3.wam.umd.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | luis alfonso collazos vargas | 2001-03-01 04:32:52 | |
Previous Message | Raghu Bhai Chalasani | 2001-03-01 01:34:22 | timestamp, date and bool with PQgetvalue... |