elrond
30-10-2003, 15:24
ich habe, auch nach dem lesen der handbücher fogendes Problem:
ich versuche aus eine Tabelle namens history daten zu selektieren
++++++++++++++++++++++++++++++++++++++
Table "public.history"
Column | Type | Modifiers
-----------+-----------------------------+-----------
histid | integer | not null
histobjid | character varying(20) | not null
objtypid | integer | not null
histdat | timestamp without time zone | not null
histtext | character varying(150) | not null
Indexes: history_pkey primary key btree (histid)
Foreign Key constraints: $5 FOREIGN KEY (objtypid) REFERENCES objtyp(objtypid) ON UPDATE NO ACTION ON DELETE NO ACTION
++++++++++++++++++++++++++++++++++++++
Ich versuche dabei den timestamp in eine für das frontend brauchbare form zu bringen, unda habe dabei an die funktion "to_char" gedacht.
das hier klappt:
select to_char(timestamp 'now()','HH24:MI');
aber das hier eben nicht:
select to_char(timestamp histdat,'HH24:MI') from history;
od.
select to_char(timestamp 'histdat','HH24:MI') from history;
was mache ich falsch???
ich versuche aus eine Tabelle namens history daten zu selektieren
++++++++++++++++++++++++++++++++++++++
Table "public.history"
Column | Type | Modifiers
-----------+-----------------------------+-----------
histid | integer | not null
histobjid | character varying(20) | not null
objtypid | integer | not null
histdat | timestamp without time zone | not null
histtext | character varying(150) | not null
Indexes: history_pkey primary key btree (histid)
Foreign Key constraints: $5 FOREIGN KEY (objtypid) REFERENCES objtyp(objtypid) ON UPDATE NO ACTION ON DELETE NO ACTION
++++++++++++++++++++++++++++++++++++++
Ich versuche dabei den timestamp in eine für das frontend brauchbare form zu bringen, unda habe dabei an die funktion "to_char" gedacht.
das hier klappt:
select to_char(timestamp 'now()','HH24:MI');
aber das hier eben nicht:
select to_char(timestamp histdat,'HH24:MI') from history;
od.
select to_char(timestamp 'histdat','HH24:MI') from history;
was mache ich falsch???