DatePart

Overview

Returns a specified part of a date.

Syntax

DatePart(1, 2)

Function Properties

OrdinalTypeDescription
1DateRequiredDate value used to retrieve a specified part using either MM/dd/yyyy or YYYY-MM-DD format
2stringRequiredThe part of the date to retrieve. Valid values include Y, M, D, H, or MI

Usage

System returns: 2008