Atof (converts a string to a float number)
Atoi (convert a string to an integer)
Atol (convert string to integer)
Gcvt (convert the float number to a string and rounding it out)
Strtodd (convert a string to a floating point number)
Select nvl (trunc (months_between (to_date (: splyendtm, 'yyyy-mm-dd hh24: MI: ss'), to_date (: sregtm, 'yyyy-mm ')), 1), '') into: smonthregend from dual;
Trunc function for truncation of values:
Trunc (number) indicates the truncation number, and trunc (date) indicates the truncation date.
(1) truncation number: Format: trunc (N1, N2)
N1 indicates the number to be truncated, N2 indicates the number to be truncated. N2 can be a negative number, indicating that the decimal point is truncated.
Note that trunc truncation is not rounding.
(2) truncation Date:
Run the command: Alter session set nls_date_format = 'yyyy-mm-dd hh24: MI: hh ';
Today's screenshot:
SQL> select sysdate, trunc (sysdate, 'dd') from dual;
Sysdate trunc (sysdate, 'dd ')
--------------------------------------
21:31:17 00:00:00
Months_between function:
Months_between (X, Y) is used to calculate the number of months between x and y.
If X is earlier than Y in the calendar, months_between () returns a negative number.