Home

Getting Started

Utilities

Indexing

Omnidex

Development

Tutorials

Quick Links

 

sectionpage

Appendix

Valid Formats

Date Data Types

 

Appendix

 

Date Formats

The FORMAT clause of the COLUMN section in the Omnidex Environment file applies to Omnidex Date class data types only. This includes OMNIDEX DATE, OMNIDEX DATETIME and OMNIDEX TIME data types.

In the INTERNAL section of the COLUMN section, this refers to the actual data stored in the database, in which case, this is only applicable to flat file databases. This only applies when the data type of the actual data stored in the database is an Omnidex Date class data type, which usually only occurs in flat file databases.
If the data type of the actual data in the database is an Omnidex Date class data type, use this clause to indicate the granularity of the data. For example, if the data type is OMNIDEX DATE and only the year and month are stored in the database, the format_spec would be: YYYYMM or YYMM.

In the OMNIDEX section of the COLUMN section, this refers to what is stored in the index files.
No matter what the data type of the database date data is, the Omnidex indexes store only Omnidex Date class data. Use the FORMAT format_spec clause to define the granularity of the data stored in the index files. For example, if the database data type is ORACLE DATETIME but you only want to search on the date, there is no need to store the time portion in the indexes.

The default format_spec is: YYYYMMDD

This clause DOES NOT affect the appearance of returned data.

DISC recommends that you do not index more granularity than is actually needed for the application. For example, in applications that will qualify records based on years, months, or even days, but never on time of day, it is not necessary and not recommended that the time data be indexed. The time data is not lost, it is simply not stored in the Omnidex indexes.

 

Valid Formats

Date formats are based on the following:

YYYYMMDDHHNNSSFF

YYYY
long year - 1941, 2005

YY
short year - 41, 05

MM
month from 01 to 12 - June = 06

DD
day from 01 to 31

HH
hour from 00 to 23
00 for midnight
06 for 6 am
14 for 2 pm

NN
minute from 00 to 59

SS
second from 00 to 59

FF
fraction of a second from 0.01 to 0.99

Date formats can can be any of the following:

YYYY
YYYYMM
YYYYMMDD
YYYYMMDDHH
YYYYMMDDHHNN
YYYYMMDDHHNNSS
YYYYMMDDHHNNSSFF
YY
YYMM
YYMMDD
YYMMDDHH
YYMMDDHHNN
YYMMDDHHNNSS
YYMMDDHHNNSSFF
MM
MMDD
MMDDHH
MMDDHHNN
MMDDHHNNSS
MMDDHHNNSSFF
DD
DDHH
DDHHNN
DDHHNNSS
DDHHNNSSFF
HH
HHNN
HHNNSS
HHNNSSFF
NN
NNSS
NNSSFF
SS
SSFF
FF

 

Top