Autor Beitrag
WEBSTER
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 94



BeitragVerfasst: Mi 29.03.06 09:53 
Salute,

bei diesem Select: "select G.ZUSAGEDAT as Leistungszeitraum..." ist das Ergebniss ok: 02.11.2005
ZUSAGEDAT ist vom Typ Date.

Mache ich einen Substring select : "Select substring((G.ZUSAGEDAT) FROM 1 for 10) as Leistungszeitraum...." , dann lautet das Ergebniss 2005-11-02

Wieso? Ich wollte eigentlich nur folgendes Ergebniss haben....: 11.2005


Bitte um Hilfe....


THX
WEBSTER

_________________
Wer etwas anders macht, aber nicht besser, der sollte besser etwas anderes machen.
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: Mi 29.03.06 10:11 
Ich vermute, dass dein Substring auf dem Server ausgeführt wird. Wenn dort dann die falsche Landeseinstellung für Date-Typen drin steht, kann das Problem entstehen. Eine andere Ursache könnte sein, dass das Substring auf das interne Date-Format zugreift. Das nationale Format bleibt also grundsätzlich unberücksichtigt.
Wie das nun genau bei Firebird ist, weiß ich im Moment auch nicht.
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Mi 29.03.06 10:25 
Ich würde die Aufsplittung entweder am Client ausführen oder mit EXTRACT Monat und Jahr ermittlen und den Zielstring concaten

_________________
Markus Kinzler.