a "hack" for creating "Oracle Date Formats" such as 04-JUL-1776


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

Posted by Bob A on September 22, 2010 at 12:39:56:

Construct a table of Months of the Year:
for English, 3 characters long with 2 blanks at the beginning:
--- 0---|--- 10---|--- 20---|--- 30---|--- 40---|
123456789|123456789|123456789|123456789|123456789|
" JanFebMarAprMayJunJulAugSepOctNovDec"

or, for French, 4 characters long with 3 blanks at the beginning:
--- 0---|--- 10---|--- 20---|--- 30---|--- 40---|--- 50---|
123456789|123456789|123456789|123456789|123456789|123456789|
" Jan Fev MarsAvr Mai JuinJuilAoutSep Oct Nov Dec "
(this is necessary because Juin/Juillet have the same first 3 letters

in general, if the element is n characters long, precede with n-1 blanks.

Now, take the month and multiply by the length of an alement to get the starting index:

ix = mm * length.of.element
mm$ = SUB(Table,ix,length.of.element)

a similar procedure can be used for decoding alphabetic text.


Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?  

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):





Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]