home *** CD-ROM | disk | FTP | other *** search
/ RBBS in a Box Volume 1 #3.1 / RBBSIABOX31.cdr / ddut / datehint.txt < prev    next >
Text File  |  1984-09-21  |  1KB  |  29 lines

  1. Many people like to read dates in the month/day/year format but
  2. they want the data sorted in the year/month/day sequence. One
  3. solution is to enter the date as MMDDYY for printing and then
  4. have it converted to YYMMDD in another field (or column) for
  5. sorting.
  6.      In programming, a MMDDYY date may be converted by
  7. multiplying it by 10,000.01 and keeping only the six digits
  8. immediately preceding the decimal in the product. For example,
  9. the date December 31, 1984, is expressed as 123184 in the MMDDYY
  10. format.
  11.  
  12.        123184
  13.    x    10000.01
  14.  ==================
  15.    1231841231.84
  16.  
  17.     The six digits immediately preceding the decimal point are
  18. 841231. VISICALC and 1-2-3 users may accomplish this conversion
  19. with the formula below.
  20.  
  21.  @INT(B5*10000.01-@INT(B5*10000.01/1000000)*1000000)
  22.  NOTE: B5 IS THE LOCATION OF THE DATE TO BE CONVERTED.
  23.  
  24.      This formula should be placed in a column that will not be
  25. included in the print range, but will be included in the sort
  26. range. because of the delay that may be caused by this
  27. calculation, it may be desirable to turn off the automatic
  28. calculation when additional data are being entered.
  29.