|
| |
DatePart(interval,date[,firstdayofweek[,firstweekofyear]]) |
Returns the designated part of the time. The interval argument accepts the following values:
| Interval: |
Description: |
| yyyy |
Year |
| q |
Quarter |
| m |
Month |
| y |
Day of year |
| d |
Day |
| w |
Weekday |
| ww |
Week of year |
| h |
Hour |
| n |
Minute |
| s |
Second |
| Before: |
Code: |
After: |
| 17.02.01 |
DatePart("yyyy",date) |
2001 |
| 17.02.01 |
DatePart("m",date) |
2 |
| 17.02.01 |
DatePart("q",date) |
1 |
Related functions:
Date, DateAdd, DateDiff, DateSerial, DateValue, Day, Month, MonthName, Now, Weekday, WeekDayName, Year
|
| View All Functions A-Z |
|
| |
|