Re: a question about dates and timestamp
От | Karel Zak |
---|---|
Тема | Re: a question about dates and timestamp |
Дата | |
Msg-id | Pine.LNX.3.96.1000803122838.31239E-100000@ara.zf.jcu.cz обсуждение исходный текст |
Ответ на | Re: a question about dates and timestamp (Ange Michel POZZO <poange@technologist.com>) |
Список | pgsql-sql |
On Thu, 3 Aug 2000, Ange Michel POZZO wrote: > Le jeu, 03 aoű 2000, Karel Zak a écrit : > > > my question is how can i convert the numeric or the int4 value to > > > a date value? > > > > > > test=# select abstime(965293003); > > abstime > > ------------------------ > > 2000-08-03 10:56:43+02 > > (1 row) > > > > Karel > > > this is the result of the query for me : > > test=> select abstime(965293003); > ?column? > --------- > 965293003 > (1 row) Ooops I use CVS version, but you have probably 6.5... Sorry, Now I haven't time check what is 7.1 / 7.0 / 6.5 feature. in current code: test=# select '965293003.000001'::int; ERROR: pg_atoi: error in "965293003.000001": can't parse ".000001" test=# select '965293003.000001'::numeric(9, 0);?column? -----------965293003 (1 row) test=# select '965293003.000001'::numeric(9, 0)::int;?column? -----------965293003 (1 row) test=# select abstime('965293003.000001'::numeric(9, 0)::int); abstime ------------------------2000-08-03 10:56:43+02 (1 row) BTW. The postgreSQL has good date/time support; why you use slow and expensive numeric?
В списке pgsql-sql по дате отправления: