Hallo Zusammen,
ich habe ein Problem mit einer Abfrage eines zeitraumes in SQL
wenn ich das Script so anwende liefert er mir keine werte
ziel ist es das alle fertigen Projekten von heute bis (heute -28 Tage)
WHERE Projekt.AuftragStatus=9 AND Projekt.FertigStellung IS NOT NULL AND
Projekt.Fertigstellung >= DateAdd(Day, -28, CONVERT(DATETIME, CONVERT(CHAR(8), GETDATE(), 112), 112))
so funktiuoniert es
WHERE Projekt.AuftragStatus=9 AND
Projekt.FertigStellung >= '14.05.2013' and
Projekt.Fertigstellung <= '14.06.2013'
und so ist das datum hinterlegt im feld fertigstellung 2012-12-31 00:00:00.000
ich habe ein Problem mit einer Abfrage eines zeitraumes in SQL
wenn ich das Script so anwende liefert er mir keine werte
ziel ist es das alle fertigen Projekten von heute bis (heute -28 Tage)
WHERE Projekt.AuftragStatus=9 AND Projekt.FertigStellung IS NOT NULL AND
Projekt.Fertigstellung >= DateAdd(Day, -28, CONVERT(DATETIME, CONVERT(CHAR(8), GETDATE(), 112), 112))
so funktiuoniert es
WHERE Projekt.AuftragStatus=9 AND
Projekt.FertigStellung >= '14.05.2013' and
Projekt.Fertigstellung <= '14.06.2013'
und so ist das datum hinterlegt im feld fertigstellung 2012-12-31 00:00:00.000
Comment