n Year(Date()) returns 2007 (or today??™s year).
n DateDiff(): Returns a number based on a specific time interval between two different
dates. The time interval can be d (day), ww (weeks), m (months), q (quarters), yyyy
(years). The syntax is:
n DateDiff(???d???, Date(), #02/04/92#) returns 5550 (the number of days) if
the current date is April 16, 2007.
459
Using Expressions in Queries and VBA Code 13
n DateDiff(???yyyy???, Date(), #02/04/92#) returns 15 (the number of years) if
n DateDiff(???q???, Date(), #02/04/92#) returns 61 (the number of quarters) if
the current date is April 16, 2007.
n DateAdd(): Returns a new date based on a specific time interval. The time interval can
be d (day), ww (weeks), m (months), q (quarters), yyyy (years). The syntax is:
n DateAdd(???d???,22, Date()) returns 5/8/2007 if the current date is April 16,
2007.
n DateAdd(???ww???, 10, #01/01/2007#) returns 3/11/2007.
n DatePart(): Returns a number based on a specific time interval for a date. The time
interval can be d (day), y (day of year), w (weekday), ww (weeks), m (months), q (quarters),
yyyy (years).
Pages:
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973