Autor Beitrag
mexx
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1183



BeitragVerfasst: Fr 05.05.06 07:56 
Hallo,

ich habe einen Tabelle mit Timestampwerten und möchte nun den April auslesen, habe aber nur die 4 als deklaration des Monats und kann auch keine anderen String daraus basteln.

_________________
Das Unsympathische an den Computern ist, dass sie nur ja oder nein sagen können, aber nicht vielleicht.
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Fr 05.05.06 08:03 
Welche DB?
mexx Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1183



BeitragVerfasst: Fr 05.05.06 08:05 
Firebird interbase

_________________
Das Unsympathische an den Computern ist, dass sie nur ja oder nein sagen können, aber nicht vielleicht.
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Fr 05.05.06 08:21 
Firebird sollte auch die Funktion "Extract" kennen. Mit der kann man einzelne Werte aus dem Feld auslesen (DAY, MONTH, YEAR, SECOND, etc.)
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Fr 05.05.06 08:21 
ausblenden SQL-Anweisung
1:
select extract( month from <feldname>) from <tabellenname>;					

_________________
Markus Kinzler.
mexx Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1183



BeitragVerfasst: Fr 05.05.06 08:40 
????

SQL Dialect 3

Arbeitszeit = timestamp
Einloggen, um Attachments anzusehen!
_________________
Das Unsympathische an den Computern ist, dass sie nur ja oder nein sagen können, aber nicht vielleicht.
Spaceguide
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 552


(D3/D7/D8) Prof.
BeitragVerfasst: Fr 05.05.06 08:50 
Wenn der Timestamp im Unix-Format vorliegt, hilft dir vielleicht die Funktion UnixToDateTime der Unit DateUtils weiter.
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Fr 05.05.06 08:51 
Anscheinend kennt der Query-Analyzer die EXTRACT-Funktion nicht! Hast du die Abfrage mal aus Delphi oder einem anderen Admin-Tool ( z.B. IBexpert) versucht? Bei mit (FB 1.5/2 + IBExpert ) funktioniert es.

_________________
Markus Kinzler.