DateAdd Function

āĻāĻ•āϟāĻŋ āĻĒā§āϰāĻĻāĻ¤ā§āϤ āϤāĻžāϰāĻŋāϖ⧇ āĻ•ā§Ÿā§‡āĻ•āĻŦāĻžāϰ āϤāĻžāϰāĻŋāϖ⧇āϰ āĻŦāĻŋāϰāϤ⧀ āϏāĻ‚āϝ⧋āϜāύ āĻ•āϰāĻž āĻšā§Ÿ āĻāĻŦāĻ‚ āĻĢāϞāĻžāĻĢāϞ⧇āϰ āϤāĻžāϰāĻŋāĻ– āĻĒā§āϰāĻĻāĻžāύ āĻ•āϰ⧇āĨ¤

āϏāĻŋāύāĻŸā§āϝāĻžāĻ•ā§āϏ:


DateAdd (Add, Count, Date)

āĻĒā§āϰāĻĻāĻžāύ āĻŽāĻžāύ:

āϤāĻžāϰāĻŋāĻ– āϧāĻžāϰāĻŖāĻ•āĻžāϰ⧀ āĻāĻ•āϟāĻŋ āϭ⧇āϰāĻŋā§Ÿā§‡āĻ¨ā§āϟāĨ¤

āĻĒā§āϝāĻžāϰāĻžāĻŽāĻŋāϟāĻžāϰ:

Add - A string expression from the following table, specifying the date interval.

āϏāĻ‚āϝ⧋āϜāύ (āĻ¸ā§āĻŸā§āϰāĻŋāĻ‚ āĻŽāĻžāύ)

āĻŦā§āϝāĻžāĻ–ā§āϝāĻž

yyyy

āĻŦāĻ›āϰ

q

āϚāϤ⧁āĻ°ā§āĻĨāĻžāĻ‚āĻļ

m

āĻŽāĻžāϏ

y

āĻŦāĻ›āϰ⧇āϰ āĻĻāĻŋāύ

w

āĻ•āĻ°ā§āĻŽāĻĻāĻŋāĻŦāϏ

ww

āĻŦāĻ›āϰ⧇āϰ āϏāĻĒā§āϤāĻžāĻš

d

āĻĻāĻŋāύ

h

āϘāĻ¨ā§āϟāĻž

n

āĻŽāĻŋāύāĻŋāϟ

s

āϏ⧇āϕ⧇āĻ¨ā§āĻĄ


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.

āωāĻĻāĻžāĻšāϰāĻŖ:


Sub example_dateadd
    MsgBox DateAdd("m", 1, "1/31/2004") &" - "& DateAdd("m", 1, "1/31/2005")
End Sub