Date storage class type
Date storage class type
От:
Daryl Sayers <daryl@coreng.com.au>
Дата:
I sent this last night but I dont think it got through. Here it is again. Sorry if its a duplicate. ------------------------------------------------------------------------------- I think I have missed something obvious. I am writting my first postgresql C program that accesses a table with a date field. I do the request using a DECLARE BINARY CURSOR. I have a few floats/ints etc that I get float *o; int *v; o = (float *)PQgetvalue(res, i, HIO); v = (float *)PQgetvalue(res, i, HIV); My problem is I cant seem to get a date back into a usable form. How do I retrieve a date back using a binary cursor. What storage type does it use? -- Daryl Sayers Corinthian Engineering Ph: (02) 9906 7866 Suite 19, 401 Pacific Hwy Fax: (02) 9906 1556 Artarmon, NSW, 2064 email: daryl@ci.com.au Australia www: http://www.cordoors.com.au
Re: Date storage class type
От:
Radoslaw Stachowiak <radek@alter.pl>
Дата:
*** Daryl Sayers [Friday, 11.August.2000, 14:44 +1000]: > My problem is I cant seem to get a date back into a usable form. How do > I retrieve a date back using a binary cursor. What storage type does it > use? what I did was text cursor (or a normal query) and interpretation (by sscanf) datetime field from postgres - it has a standard representation so it looks safe (more less :) to me. -- radoslaw.stachowiak.........................................http://alter.pl/