× 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: JBA date manipulation with DB2 Query manager
  • From: Larry Bolhuis <lbolhui@xxxxxxx>
  • Date: Wed, 05 May 1999 14:01:05 -0400
  • Organization: Arbor Solutions, Inc

We have been doing this since early S/36 days. We add a couple
additional fields to this generated file: fiscal year, fiscal month
(or period), work day flag (0/1) and any other date related fields. 
This makes reporting for a period a snap since this file is linked
into nearly every query anyway.
 
 - Larry

> Under the heading "crude but effective" is an approach used successfully by
> a client of mine. Write a one-off program to generate a file of dates. The
> program steps day by day from an arbitrary start date to an arbitrary end
> date. Make sure that the range encompasses all the dates you will
> realistically use. Each record will contain all the date formats you are
> likely to use. So you might have CYYMMDD, Julian, absolute (day number
> relative to an arbitrary starting point), day of week number, day of week
> name, year number, week number, day number, MM/DD/YYYY, short display
> format, long display format, etc, etc, etc.
> 
> Your queries can now join to this file by the CYYMMDD (or any) field and
> retrieve all the other formats of the date. The absolute date can be used
> for arithmetic. Subtract one date from another to get the days between
> them, or add a number of days to any date then retrieve the result in any
> format.

-- 
Larry Bolhuis         | What do you want to reload today?
Arbor Solutions, Inc  | 
(616) 451-2500        | Two rules to success in life:
lbolhui@ibm.net       | 1. Never tell people everything you know.
+---
| 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 ...

Replies:

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.