DateAdd Function

दिइएको मितिमा मिति अन्तराल थप्दछ, पटकको सङ्ख्या र परिणाम मिति फर्काउँदछ ।

वाक्य संरचना:

मिति थप्नुहोस् (थप्नुहोस्, गणना गर्नुहोस्, मिति)

मान फर्काउनुहोस्:

A Variant containing a 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