NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DatePart Function Example

This example takes a date and, using the DatePart function, displays the quarter of the year in which it occurs.

Dim TheDate As Date   ' Declare variables.
Dim Msg   
TheDate = InputBox("Enter a date:")
Msg = "Quarter: " & DatePart("q", TheDate)
MsgBox Msg