Sitemap Sitemap  |  Contact Us Contact Us  |  Clients Clients
   AddDaysToDate
  Home |  WebHare Lite |  Downloads |  HareScript |  Websites/CMS |  Applications
Search for:  in: 
HareScript
General functions
 
Base functions
Cryptography APIs
Date and time manipulation
Developers support
Mathematic and floating point utility functions
Money type utility functions
AddDaysToDate
  Adds a number of days to a date, and returns the new timestamp
 
Library wh::datetime.whlib
 
Syntax PUBLIC DATETIME FUNCTION AddDaysToDate (INTEGER add_days,DATETIME date)
 
Description This function can for example be useful to calculate expiration dates of documents or users.
 
Parameters
add_days The number of days to add to the timestamp. This value can also be negative.
date The timestamp to add the days to
 
Returns A DateTime value representing date to which add_days has been added
 
Example
// Add 20 days to the current date
INTEGER extradays := 20;
DATETIME newdate := AddDaysToDate(extradays, GetCurrentDateTime());
 
In library 'datetime'
AddDaysToDate
AddMonthsToDate
AddTimeToDate
FormatDateTime
GetCurrentDateTime
GetDatetimeDifference
GetDayCount
GetLanguageDatetimeStrings
GetMonthLength
GetMsecondCount
GetMsecsDifference
GetYearLength
LocalToUTC
MakeDate
MakeDateFromDayCount
MakeDateFromParts
MakeDateFromText
MakeDateTime
MakeDayCount
MakeTime
UnpackDateTime
UTCtoLocal
 
Top To top of page