Page 90 - IT-802_class_12
P. 90

3.10.2 Date and Time Functions

        We can add the date and time in a cell. Built into OpenOffice Calc are a number of DATE and TIME functions that can
        be used to do this.

                     Function                                         Result

             TODAY()                 It produces the current date. It contains no argument.
             NOW()                   It produces the current date and time. It contains no argument.

             =YEAR(DATE(year;        It produces the year of the date, which is enclosed within parantheses.
             month; day))            E.g. =YEAR(DATE(2020; 3; 2)) returns 2020
             =MONTH(DATE(year;       It produces the month of the date, which is enclosed within parantheses.
             month; day))            E.g. =MONTH(DATE(2020; 3; 2)) returns 3

             =DAY(DATE(year;  month;  It produces the day of the date, which is enclosed within parantheses.
             day))                   E.g. =DAY(DATE(2020; 3; 2)) returns 2


        You can also enter the formula and select the cell from which you need to extract the day, month or year.
        For example,
        Type =YEAR( and then select the cell A6 and close the formula with )
        This will extract the year from the date given in cell A6.
        3.10.3 Statistical Functions

        Statistical functions take numeric argument(s) and produce results accordingly.

        The following are the different types of statistical functions:

                  Function                                         Result

             AVERAGE( )         It produces the average (mean) of the given arguments.
                                E.g. =AVERAGE(10;20;30) Displays output: 20
                                =AVERAGE(A1;A2;A3) Displays the average of the cells A1, A2 and A3
                                =AVERAGE(A1:A10) Displays the average of the cells from the range A1 to A10

             MAX( )             It produces the largest value from the given range of cells.
                                E.g.=MAX(10;20;15;25) Displays output:25
                                =MAX(A1:A5) Displays the largest value from cell A1 to A5
                                =MAX(B2:C4) Displays the largest value of cells B2, B3, B4,C2, C3, and C4

             MIN( )             It produces the smallest value from the given set of values or range of cells.
                                E.g. =MIN(10;20;15;25) Displays output: 10
                                =MIN(A1;A2;A3) Displays the smallest value of cells A1, A2 & A3.
                                =MIN(B2:C3) Displays the smallest value of cells B2, B3, C2 & C3.

             COUNT()            It produces the number of arguments enclosed in small brackets.
                                E.g. =COUNT(1;2;15;25;3;6) Displays output: 6
                                =COUNT(A1:A20) Displays output: 20 ((if all cells, i.e., A1 to A20, contain values).






          88    Touchpad Information Technology-XII
   85   86   87   88   89   90   91   92   93   94   95