|
Mark--that's cool, definitely faster for the coder than the concatenated substrings
thanks for pointing it out --Jerome On Aug 30, 2006, at 1:08 PM, Mark Adkins wrote:
You need to convert your numeric into a date format. The best syntax Ihave found is to go through the timestamp function. date( timestamp( digits(hhdob) || '000000' ) ) Markdate: Wed, 30 Aug 2006 10:55:23 -0500 from: "Dave Boettcher" <DBoettch@xxxxxxxxxxxxxxxx> subject: Calculating difference between dates in SQL hello, I have been experimenting with interactive SQL to try to formulate a statment for later use.What I need to do is calculate an age for a client . The client mastercontains the birth date in numeric form 8,0. My statement, culled from various books and articles looks like this: SELECT days(current date) - days(date(hhdob)) "Age" , hhdob, hhnaml, hhnamf, hhcase FROM ClientMaster The result always seems to look like this: "Age" BIRTH YYYYMMDD case ++++++++++++++ 19,820,926 4 ++++++++++++++ 19,820,924 5 ++++++++++++++ 19,840,909 6 ++++++++++++++ 19,820,915 7 ++++++++++++++ 19,820,806 8 ++++++++++++++ 19,810,108 9 ++++++++++++++ 19,820,330 10From reading it seems like age should be a number, why can't I see it?Thanks in Advance for any help, Dave Boettcher--This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing listTo post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.