|
Don,wrote:
2 ways -
1st - I use the UDF function iDate (by Alan Campin available free at
www.think400.dk/downloads.htm - Thanks Alan!) to translate the data
field into a date, then compare with the current date.
when iDate(refdta) = curdate()
Nice clean and easy.
When digits(year(curdate))
On Nov 15, 2007 12:11 PM, Don Cavaiani < dcavaiani@xxxxxxxxxxxxx>
--
In System i5 Query (WRKQRY) I do the following:
------------------------------------------------
Result fields:
Today current(date)
Todaychar char(today)
Today2 '20' || substr(todaychar,7,2) || substr(todaychar,1,2 ||
substr(todaychar, 4,2) Refdta digits(refdt)
-------------------------------------------------
Then:
In Select Test:
refdta LE today2
--------------------------------
How would I do the same in SQL?
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.