home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
RBBS in a Box Volume 1 #3.1
/
RBBSIABOX31.cdr
/
ddut
/
datehint.txt
< prev
next >
Wrap
Text File
|
1984-09-21
|
1KB
|
29 lines
Many people like to read dates in the month/day/year format but
they want the data sorted in the year/month/day sequence. One
solution is to enter the date as MMDDYY for printing and then
have it converted to YYMMDD in another field (or column) for
sorting.
In programming, a MMDDYY date may be converted by
multiplying it by 10,000.01 and keeping only the six digits
immediately preceding the decimal in the product. For example,
the date December 31, 1984, is expressed as 123184 in the MMDDYY
format.
123184
x 10000.01
==================
1231841231.84
The six digits immediately preceding the decimal point are
841231. VISICALC and 1-2-3 users may accomplish this conversion
with the formula below.
@INT(B5*10000.01-@INT(B5*10000.01/1000000)*1000000)
NOTE: B5 IS THE LOCATION OF THE DATE TO BE CONVERTED.
This formula should be placed in a column that will not be
included in the print range, but will be included in the sort
range. because of the delay that may be caused by this
calculation, it may be desirable to turn off the automatic
calculation when additional data are being entered.