Data Formatting
Programmers working with SourcePro DB have several classes available for datatype normalization. (See
Chapter 7, The Data Model.) These classes provide data structures to hold complex types, yet allow them to be treated like simple types. These classes include:
RWDateTime,
RWDate, and
RWDecimalPortable from the Essential Tools Module
The data that all these classes hold are locale sensitive; in other words, legal input and output of these types look different depending on the locale in effect. The issue here is input and output of the data from the point of view of the user of an application. SourcePro DB automatically formats the data when sending to and retrieving from a database. The application programmer must be concerned only with the raw form of the data as it comes into the program or goes out to a program user.
These classes all have associated techniques to allow input and output from various locales. The following sections outline the techniques used for
RWDateTime,
RWDate, and
RWDecimalPortable. For more information on these classes, see the
Essential Tools Module User’s Guide and the
SourcePro API Reference Guide.