Cicode Programming Reference > Cicode Function Categories > Time and Date Functions Introduction > DateAdd

DateAdd

Adds time (in seconds) to a time/date value. The return value is in time/date variable format. Use this function for time and date calculations.

Syntax

DateAdd(Time, AddTime)

Time:

The time/date to which the AddTime will be added.

AddTime:

The time to add, in seconds.

Return Value

The date as a time/date variable.

Related Functions

TimeToStr, DateSub

Example

DateVariable=DateAdd(StrToDate("3/11/91"),86400);
! Adds 24 hours to 3/11/91.
NewDate=TimeToStr(DateVariable);
! Sets NewDate to 4/11/91.

See Also

Time/Date Functions