HPlogo ALLBASE/SQL C Application Programming Guide: HP 3000 MPE/iX Computer Systems

Chapter 11 Programming with ALLBASE/SQL Functions

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

Seven functions can be used with date/time data types. These functions provide flexibility for inputting and retrieving date/time data from the database.

These functions can be used with a preprocessed application or with ISQL. This chapter outlines basic principles for using date/time functions in an application program. The following sections are included:

  • Where Date/Time Functions Can Be Used.

  • Defining and Using Host Variables with Date/Time Functions.

  • Using Date/Time Input Functions.

  • Using Date/Time Output Functions.

  • Using the Date/Time ADD_MONTHS Function.

  • Coding Considerations.

  • Program Examples for Date/Time Data.

Date/time functions are used as you would use an expression. And when used in a select list, all date/time functions produce data output. Refer to the section in this chapter, "Defining and Using Host Variables with Date/Time Functions."

Suppose for example that you are programming for an international corporation. Your database tables contain various date/time columns and the data is used by employees in several countries. You write a generic program on which you base a set of customized programs, one for each geographical location. Each customized program allows the employees at a given location to input and retrieve date/time information in the formats with which they are most comfortable.

Refer to the "Host Variables" chapter for more information on date/time data types. Complete syntax and format specifications for date/time functions are found in the ALLBASE/SQL Reference Manual in the "Expressions" and "Data Types" chapters.

NOTE: For all date/time functions, character input and output values are in Native-3000 format.
Feedback to webmaster