× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Flipping dates in Excel spreadsheet
  • From: MacWheel99@xxxxxxx
  • Date: Tue, 18 Jul 2000 03:02:45 EDT

I have no idea if this will work in other languages & applications but eons 
ago in like RPG II we used to define a date as 6 positions no decimal & with 
one multiplication get from YYMMDD to MMDDYY ... let's see if I can remember 
the AL GO RYTHYM

YYMMDD multiplied by 100 into 6.0 gets MMDD 00
YYMMDD multiplied by 0.0001 gets  0000 YY
YYMMDD multiplied by 100.0001 gets MMDDYY

It was not as efficient machine cycles wise than a bunch of moves of the 
individual pieces of the date fields ... Today I create some kind of 
overlapping Data Structure in which I would

move CYYMMDD into a 4.0 field which gets MMDD & drops CYY and
or some variation thereof like
1-7 is CYYMMDD
2-3 is YY then copy that to field with different name in 8-9
then move from field in 4-9 to MMDDYY

I might have some subroutines some place that go in each direction.
BPCS has a standard subroutine to translate from YYMMDD to some number of 
days since some past date, for purposes of date math when the fields are not 
date fields.  The subroutine was rewritten for Y2K.

Al Macintyre  ©¿©
http://www.cen-elec.com MIS Manager Programmer & Computer Janitor
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.