DateAdd Function
์ง์ ํ ๋ ์ง์ ๋ ์ง ๊ฐ๊ฒฉ์ ์ฌ๋ฌ ๋ฒ ์ถ๊ฐํ๊ณ ๊ฒฐ๊ณผ ๋ ์ง๋ฅผ ๋ฐํํฉ๋๋ค.
๊ตฌ๋ฌธ:
DateAdd(Add, Count, Date)
๋ฐํ ๊ฐ:
๋ ์ง๋ฅผ ํฌํจํ ๋ณ์์ ๋๋ค.
๋งค๊ฐ ๋ณ์:
Add - A string expression from the following table, specifying the date interval.
Add(๋ฌธ์์ด ๊ฐ) |
์ค๋ช |
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