Autor Beitrag
bbfan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 164



BeitragVerfasst: Di 09.01.07 13:22 
Hi!

Ich möchte von einem Datum (TDateTime) eine bestimmte Anzahl von Tage abziehen. Wie mache ich das?

Ich habe nur die Funktion

function IncDay(const AValue: TDateTime; const ANumberOfDays: Integer = 1): TDateTime;

gefunden.

Viele Grüße!
passiv
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 270

WIN XP Professional
Delphi 7 Enterprise, Java (Eclipse), Python 2.5, Django 1.1
BeitragVerfasst: Di 09.01.07 13:27 
wenns incday gibt sollte es eigentlich decday auch geben...
aber sonst kann man ganz einfach datum-zahlrechnen lassen, z.B.: 13.4.1999 - 5 = 8.4.1999

_________________
Die Probleme, die es in der Welt gibt, sind nicht mit der gleichen Denkweise zu lösen, die sie erzeugt hat.
Albert Einstein
bbfan Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 164



BeitragVerfasst: Di 09.01.07 13:30 
Habs gefunden. Man kann direkt die Tage vom TDateTime abziehen.
espen
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 90
Erhaltene Danke: 1


D6 Prof./D7 Prof. MSSQL, MySQL
BeitragVerfasst: Di 09.01.07 14:16 
Hi

mit incday geht's natürlich auch:
ausblenden Delphi-Quelltext
1:
IncDay(now(), -100);