Description
The DateToDate$ function returns a new datetime value based on adding an interval to the specified date.
Usage
It can return a date at 30 days from today, a time at 1h45 from now, etc.
Syntax
var$ = DateToDate$(<interval$>, <number>, <date$>)
Parameters
<interval$>: string specifying the time interval you want to add to<date$>.<number>: integer, number of intervals you want to add. Can be positive for dates in the future or negative for dates in the past.<date$>: string, date to which<interval$>is added.
<interval$> Values
| Value | Unit of Time Difference |
|---|---|
| d | Day |
| w | Weekday |
| ww | Week (number of weeks) |
| y | Day of the year |
| yyyy | Year (number of years) |
| q | Quarter (number of quarters) |
| m | Month (number of months) |
| h | Hours (number of hours) |
| n | Minutes (number of minutes) |
| s | Seconds (number of seconds) |
Return Value
Returns a string, the date to which the specified datetime interval has been added.
Remarks
- The returned date always uses the Regional Settings date/time format.
- To add days to the specified date, “y”, “d”, or “w” give the same result.
