timestamp,bool,date with PQgetvalue

Поиск
Список
Период
Сортировка
От Raghu Bhai Chalasani
Тема timestamp,bool,date with PQgetvalue
Дата
Msg-id Pine.GSO.4.21.0102282037430.2589-100000@rac3.wam.umd.edu
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: aong
Дата:
Сообщение: pgaccess
Следующее
От: "luis alfonso collazos vargas"
Дата:
Сообщение: ...