HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Return the year part of the specified date
The DatePart() function returns a specified part of a date, as an integer.
DatePart(datepart, date, firstdayofweek, firstweekofyear)
Parameter | Description |
---|---|
datepart | Required. The date part to return. Can be one of the following values:
|
date | Required. The date value to be evaluated |
firstdayofweek | Optional. Specifies the first day of the week.
Can be one of the following values:
|
firstdayofyear | Optional. Specifies the first week of the year. Can be one of the following values:
|
Works in: | From Access 2000 |
---|
Return the month part of the specified date:
SELECT DatePart("m", #09/05/2017#);
Return the weekday of today's date:
SELECT DatePart("w", Date());