DatePart() |
Top Previous Next |
DatePart() - Determine Specified Part of a Given Date Description The DatePart() function is used to determine the specified part of a given date, for example the day of the week or the month of the year. DatePart(interval, date[, firstdayofweek[, firstweekofyear]]) Parameters
The date parameter specifies the date to evaluate. The optional parameter firstdayofweek specifies the [id=44#days]day of the week[/id] to use as the first day. If not specified, Sunday is the default value. The optional firstweekofyear parameter specific the how the [id=44#weeks]first week of the year[/id] is defined. Examples SMEvent.Raise "Trace", DatePart("w", now) Determine the quarter which April 1st, 1964 fell in. SMEvent.Raise "Trace", DatePart("q", "1-Apr-64") |