![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 3 of 3 total |
![]() |
Tue, Apr 4 2017 10:19 AM | Permanent Link |
Huseyin Aliz myBiss ApS | Hi All,
Can anyone please help with following to make it work with hours? function IncDay(const aValue: DateTime;aNumberOfDays:integer=1):DateTime; begin Result:=aValue; if aNumberOfDays>0 then begin Result:=EncodeDateTime(YearOf(aValue),MonthOf(aValue),DayOf(aValue),0,0,0,0)+((aNumberOfDays*MillSecDay)+(2*MillSecHour)); Result:=EncodeDateTime(YearOf(Result),MonthOf(Result),DayOf(Result),0,0,0,0); end; end; I want to change datetime field with hours instead of days ![]() Thanks in advance. Hüseyin |
Tue, Apr 4 2017 10:24 AM | Permanent Link |
Matthew Jones | Hüseyin Aliz wrote:
> Can anyone please help with following to make it work with hours? function IncMinute(tmWhen : DateTime; nMinutes : Integer) : DateTime; begin Result := tmWhen + (nMinutes * 60 * 1000); end; function IncSecond(tmWhen : DateTime; nSeconds : Integer) : DateTime; begin Result := tmWhen + (nSeconds * 1000); end; function IncMilliSecond(tmWhen : DateTime; nMilliseconds : Integer) : DateTime; begin Result := tmWhen + nMilliseconds; end; function IncHour(tmWhen : DateTime; nHours : Integer) : DateTime; begin // Result := tmWhen + (nHours * 1000 * 60 * 60); Result := tmWhen + (nHours * 3600000); end; -- Matthew Jones |
Tue, Apr 4 2017 11:45 AM | Permanent Link |
Huseyin Aliz myBiss ApS | Matthew,
Thanks ![]() Regards, Hüseyin Den 04-04-2017 kl. 16:24 skrev Matthew Jones: > Hüseyin Aliz wrote: > >> Can anyone please help with following to make it work with hours? > function IncMinute(tmWhen : DateTime; nMinutes : Integer) : DateTime; > begin > Result := tmWhen + (nMinutes * 60 * 1000); > end; > > function IncSecond(tmWhen : DateTime; nSeconds : Integer) : DateTime; > begin > Result := tmWhen + (nSeconds * 1000); > end; > > function IncMilliSecond(tmWhen : DateTime; nMilliseconds : Integer) : DateTime; > begin > Result := tmWhen + nMilliseconds; > end; > > function IncHour(tmWhen : DateTime; nHours : Integer) : DateTime; > begin > // Result := tmWhen + (nHours * 1000 * 60 * 60); > Result := tmWhen + (nHours * 3600000); > end; > |
This web page was last updated on Wednesday, March 26, 2025 at 06:45 AM | Privacy Policy![]() © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |