PowerCenter
- PowerCenter 10.5
- All Products
TRUNC(12/1/1997 3:10:15, 'YY')
TRUNC(4/15/1997 12:15:00, 'MM')
TRUNC(6/13/1997 2:30:45, 'DD')
TRUNC(4/1/1997 11:29:35, 'HH')
TRUNC(5/22/1997 10:15:29, 'MI')
TRUNC(5/22/1997 10:15:29.135, 'SS')
TRUNC(5/22/1997 10:15:30.135235, 'MS')
TRUNC(5/22/1997 10:15:29.135235478, 'US')
TRUNC(date[,format] )
Argument
| Required/
Optional
| Description
|
---|---|---|
date
| Required
| Date/Time datatype. The date values you want to truncate. You can enter any valid transformation expression that evaluates to a date.
|
format
| Optional
| Enter a valid format string. The format string is not case sensitive. If you omit the format string, the function truncates the time portion of the date, setting it to 00:00:00.000000000.
|
TRUNC( DATE_SHIPPED, 'Y' ) TRUNC( DATE_SHIPPED, 'YY' ) TRUNC( DATE_SHIPPED, 'YYY' ) TRUNC( DATE_SHIPPED, 'YYYY' )
|
|
---|---|
|
|
|
|
|
|
|
|
|
|
TRUNC( DATE_SHIPPED, 'MM' ) TRUNC( DATE_SHIPPED, 'MON' ) TRUNC( DATE_SHIPPED, 'MONTH' )
|
|
---|---|
|
|
|
|
|
|
|
|
|
|
TRUNC( DATE_SHIPPED, 'D' ) TRUNC( DATE_SHIPPED, 'DD' ) TRUNC( DATE_SHIPPED, 'DDD' ) TRUNC( DATE_SHIPPED, 'DY' ) TRUNC( DATE_SHIPPED, 'DAY' )
|
|
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
TRUNC( DATE_SHIPPED, 'HH' ) TRUNC( DATE_SHIPPED, 'HH12' ) TRUNC( DATE_SHIPPED, 'HH24' )
|
|
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
TRUNC( DATE_SHIPPED, 'MI' )
|
|
---|---|
|
|
|
|
|
|
|
|
|
|
|
|