|
> -----Original Message----- > From: midrange-l-bounces@xxxxxxxxxxxx / CWilt@xxxxxxxxxxxx > Sent: Monday, July 19, 2004 4:53 PM > > Dan, > > You could, by using the cast function. > > substr(digits(cast(TRNDT+190000000) as dec(8,0)),1,4) > > But notice that for the month and year, you could also simply drop the > +190000000. > > substr(digits(cast(TRNDT+190000000) as dec(8,0)),1,4) > ||'-'||substr(digits(TRNDT),4,2) > ||'-'||substr(digits(TRNDT),6,2) > > All in all, a good example of why you should use a UDF once you get it > working ;-) > > Charles If I do the CAST in the SELECT, how then may I use that in a WHERE clause without having to define the CAST again? db
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.