SET_DATE_PART(date,format,value)
Argument
| Required/
Optional
| Description
|
---|---|---|
date
| Required
| Date/Time datatype. The date you want to modify. You can enter any valid expression.
|
format
| Required
| A format string specifying the portion of the date to be changed. The format string is not case sensitive.
|
value
| Required
| A positive integer value assigned to the specified portion of the date. The integer must be a valid value for the part of the date you want to change. If you enter an improper value (for example, February 30), the session fails.
|
SET_DATE_PART( DATE_PROMISED, 'HH', 16 ) SET_DATE_PART( DATE_PROMISED, 'HH12', 16 ) SET_DATE_PART( DATE_PROMISED, 'HH24', 16 )
|
|
---|---|
|
|
|
|
|
|
|
|
|
|
SET_DATE_PART( DATE_PROMISED, 'MM', 6 ) SET_DATE_PART( DATE_PROMISED, 'MON', 6 ) SET_DATE_PART( DATE_PROMISED, 'MONTH', 6 )
|
|
---|---|
|
|
|
|
|
|
|
|
|
|
SET_DATE_PART( DATE_PROMISED, 'Y', 2000 ) SET_DATE_PART( DATE_PROMISED, 'YY', 2000 ) SET_DATE_PART( DATE_PROMISED, 'YYY', 2000 ) SET_DATE_PART( DATE_PROMISED, 'YYYY', 2000 )
|
|
---|---|
|
|
|
|
|
|
|
|
|
|
SET_DATE_PART( SET_DATE_PART( SET_DATE_PART( DATE_ENTERED, 'YYYY', 1998),MM', 7), 'DD', 1)