How to: |
Given a date in standard date or date-time format and a component, DTPART returns the component value in integer format.
DTPART(date, component)
where:
Date or date-time
Is the date in standard date or date-time format.
Keyword
Is the component to extract in integer format. Valid components (and values) are:
DTPART extracts the quarter from the employee start date:
DTPART(START_DATE, QUARTER)
For 2009/04/11, the result is 2.
iWay Software |