DateAdd Function
Amiesta un intervalu a una fecha determinada una serie de vegaes y devuelve la fecha resultante.
Sintaxis:
DateAdd (Amestar, Cuenta, Data)
Valor de torna:
Variante que contién una fecha.
Parámetros:
Add - A string expression from the following table, specifying the date interval.
Add (valor de cadena) |
Esplicación |
yyyy |
Añu |
t |
Trimestre |
m |
Mes |
y |
Día del añu |
w |
Día de la selmana |
ww |
Selmana del añu |
d |
Día |
h |
Hora |
n |
Minutu |
s |
Segundu |
Count - A numerical expression specifying how often the Add interval will be added (Count is positive) or subtracted (Count is negative).
Date - A given date or the name of a Variant variable containing a date. The Add value will be added Count times to this value.
Exemplu:
Sub example_dateadd
MsgBox DateAdd("m", 1, "1/31/2004") &" - "& DateAdd("m", 1, "1/31/2005")
End Sub