summaryrefslogtreecommitdiff
path: root/docs/html/xbc3.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/html/xbc3.html')
-rwxr-xr-xdocs/html/xbc3.html42
1 files changed, 36 insertions, 6 deletions
diff --git a/docs/html/xbc3.html b/docs/html/xbc3.html
index f2f4a1d..866850f 100755
--- a/docs/html/xbc3.html
+++ b/docs/html/xbc3.html
@@ -2,8 +2,8 @@
<HTML>
<TITLE>Xbase DBMS Chapter 3</TITLE>
<BODY BGCOLOR=#FFFFFF>
-<H1><p align="center">Fields and Strings</p></H1>
-<p align="center">Chapter Updated 11/21/22</p><hr>
+<H1><p align="center">Fields, Strings and Dates</p></H1>
+<p align="center">Chapter Updated 04/28/23</p><hr>
<br><br>
The main objective of this chapter is to provide basic information regarding
@@ -13,7 +13,6 @@ Field names can be up to ten bytes in length and can contain characters, numbers
or special characters in the name. The field methods are used to manipulate
the data in a record of a data file. There are several types of fields.<br><br>
-
<TABLE BORDER>
<CAPTION ALIGN="TOP"><h3>Field Types</H3></CAPTION>
<TR VALIGN="BASELINE">
@@ -33,7 +32,7 @@ After the file is created, the field characteristics can not be changed. To
change field characteristics, a new database table must be defined with the new
field requirements.<br><br>
-<h2>Memo Fields</h2>
+<h3>Memo Fields</h3>
Memo fields are variable length data fields which are stored in two parts.
This first part is a ten byte field which is stored
@@ -52,14 +51,14 @@ using.
To utilize memo fields, the application program must allocate a buffer
which is large enough to handle the memo data.<br><br>
-<h2>Fields and Field Numbers</h2>
+<h3>Fields and Field Numbers</h3>
The Xbase routines can access field data via using field names or field
numbers. Field numbers are numbered 0-n where the first field in a datafile
is field 0 going through the last field n. Accessing fields by number is
slightly more efficient than accessing by name.<br><br>
-<h2>Strings</h2>
+<h3>Strings</h3>
Xbase64 includes support for a string class <em>xbString</em>.
The xbString class interface was originally derived from the
@@ -67,6 +66,37 @@ The xbString class interface was originally derived from the
If you are familiar with other string classes, this one should be similar.
Strings can be used to manage strings of character data.
<br><br>
+
+<h3>Date Fields</h3>
+
+All dates are stored in the .DBF files as Gregorian dates with format CCYYMMDD.<br><br>
+The library date routines work with dates formated with the same CCYYMMDD format.<br><br>
+
+<h3>Null Dates</h3>
+Date fields in the database stored as eight spaces are considered null dates.<br><br>
+
+<h3>Leap Years</h3>
+
+A leap year is a year having 366 days, which can be evenly
+divisible by 4 and not by 100 or divisible by 400. There are also leap centuries.
+Leap centuries are years which are evenly divisible by 400.
+
+<h3>Julian Dates</h3>
+
+The Julian date routines calculate a Julian date as the number of days
+since 01/01/0001 with an offset of 1721425L.
+<br><br>
+
+Julian dates are useful for doing date arithmetic such as determining the
+difference between two dates or calculating a future or past date.<br><br>
+
+To determine the difference between two dates, convert both dates to a
+Julian date and subtract one from the other.<br><br>
+
+To calculate a future or past date, convert the base date to a Julian date,
+add (or subtract) the number of days necessary to (from) it and convert the
+Julian date back to a Gregorian date.<br><br>
+
<hr>
<p><img src="xbase.jpg"><hr>
</BODY>