|
Attached is a spreadsheet with the conversion formulas. -----Original Message----- From: Pete Hall [SMTP:pbhall@execpc.com] Sent: Monday, July 17, 2000 10:45 PM To: MIDRANGE-L@midrange.com Subject: Re: Flipping dates in Excel spreadsheet At 13:39 07/17/2000 , Patrick Shrader wrote: >Has anyone created a slick formula to convert a date in CYYMMDD to MMDDYY in >an Excel spreadsheet? I have created a number of spreadsheets that use ODBC >to connect to legacy files. These applications use the old date (7,0) format >and are not date fields. However, I need to manipulate the information in >Excel like a date. So, if you have a formula or macro that will flip the >date, I would be most appreciative. You could convert them to actual dates in either the query, or in a view over the table, something like this: DATE(SUBSTR(DIGITS(DECIMAL(NUMDAT+19000000,8,0)),1,4)||'-'|| SUBSTR(DIGITS(NUMDAT),4,2)||'-'||SUBSTR(DIGITS(NUMDAT),6,2)) You can do this quite easily with CREATE VIEW. I did something similar with views over JDE dates (Julian), and it worked just fine. Pete Hall pbhall@execpc.com http://www.execpc.com/~pbhall +--- | 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 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.