This lesson is locked
A short preview is available. Purchase once for lifetime access.
Beginner Β· 10:00
Built-In Functions Part 2: Numeric and Date/Time
Numeric values rarely arrive at the precision arithmetic needs, and legacy dates rarely arrive as genuine DATE values at all. This lesson covers the conversion functions %DEC, %DECH, %INT, %UNS, and %CHAR; the constructors %DATE, %TIME, and %TIMESTAMP; the interval function %DIFF; and theβ¦
What you'll be able to do
- 1Use %DEC to convert a character or numeric value into packed decimal with explicit precision, and distinguish its truncating behavior from the half-adjusting behavior of %DECH.
- 2Use %INT and %UNS to convert a value into a signed or unsigned whole number, and identify the runtime risk of applying %UNS to a value that may be negative.
- 3Use %CHAR to convert a numeric, date, time, or timestamp value into character form, including the optional format parameter.
- 4Construct genuine DATE, TIME, and TIMESTAMP values from character or numeric input using %DATE, %TIME, and %TIMESTAMP.
- 5Use %DIFF to compute the interval between two date, time, or timestamp values, and apply %DAYS, %MONTHS, and %YEARS to add or subtract a span of time.
Create your account
Takes a few seconds β you'll be right back here after.