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

Please support us!