Hirdetés

Keresés

Új hozzászólás Aktív témák

  • zka67

    őstag

    válasz D@ni88 #1910 üzenetére

    A DateUtils unitban vannak a dátum/idő rutinok. Ebben megtalálod a többek között a következőket is:

    function IncYear(const AValue: TDateTime; const ANumberOfYears: Integer = 1): TDateTime;
    // function IncMonth is in SysUtils
    function IncWeek(const AValue: TDateTime; const ANumberOfWeeks: Integer = 1): TDateTime;
    function IncDay(const AValue: TDateTime; const ANumberOfDays: Integer = 1): TDateTime;
    function IncHour(const AValue: TDateTime; const ANumberOfHours: Int64 = 1): TDateTime;
    function IncMinute(const AValue: TDateTime; const ANumberOfMinutes: Int64 = 1): TDateTime;
    function IncSecond(const AValue: TDateTime; const ANumberOfSeconds: Int64 = 1): TDateTime;
    function IncMilliSecond(const AValue: TDateTime; const ANumberOfMilliSeconds: Int64 = 1): TDateTime;

    pl. ha egy perccel többet szeretnél a jelenlegi időnél, akkor

    Label1.Caption := DateTimeToStr( IncMinute(Now, 1) );

Új hozzászólás Aktív témák