Page 120 - Open Soource Technologies 304.indd
P. 120

Event Driven Programming



                                 Hyperbolic                  HCosec (X) = 2/(Exp (X)) – Exp (–X))
                                  tangent
                                                       HCotan(X) = (Exp(X) + Exp(–X))/(Exp(X) – Exp(–X))
                                 Hyperbolic
                                   secant                    HArcsin (X) = Log (X+Sqr (X*X + 1))

                                 Hyperbolic
                                                              HArccos (X) = Log (X+Sqr (X*X–1))
                                  cosecant
                                 Hyperbolic
                                 cotangent

                                  Inverse
                                 hyperbolic
                                    sine
                                  Inverse

                                 hyperbolic
                                   cosine

                          5.2.12 Handling Dates and Times
                          One of the biggest headaches a programmer can have is working with dates.
                          Handling hours, minutes, and seconds can be as bad as working with pounds,
                          shillings, and pence. Fortunately, Visual Basic has a number of date and

                          time handling functions.
                          Visual Basic
                          date
                          keywords. Use This

                          To do This
                                      Get the
                                                                         Date, Now, Time
                                    Current date
                                      or time
                                                                     DateAdd, DateDiff, DatePart
                                   Perform date
                                    calculations                        DateSerial, DateValue
                                   Return a data
                                                                       TimeSerial, TimeValue
                                   Return a time
                                    Set the data                            Date, Time
                                      or time
                                                                              Timer
                                      Time a
                                      process


                          114                    LOVELY PROFESSIONAL UNIVERSITY
   115   116   117   118   119   120   121   122   123   124   125