|
> In your specific case of populating a YYYYMMDD char from a date, the > following will return "20020802": > substr(char(curdate(),ISO),1,4)|| > substr(char(curdate(),ISO),6,2)|| > substr(char(curdate(),ISO),9,2) Thanks. Loyd, that's a much more elegant solution than the one I came up with. > The char() function returns "2002-08-02", from which the > component parts, > with leading zeroes that you expect, are extracted. > The char() function also allows an optional variable to > specify the format > of the converted date field, much like factor 1 of the MOVE > operation for > dates. I came across the optional variable in my reading yesterday, so I ought to have come up with your solution, but there you go. Your solution has the added advantage of behaving the same when run from Ops Nav as when run from RUNSQLSTM. But that's a rant for another day. Thanks again. Cheers, Martin. -- Martin McCallion Senior Technical Consultant Work: martin.mccallion@misys.com Home: martin.mccallion@ukonline.co.uk Misys International Banking Systems 1 St George's Road, London, SW19 4DR, UK T +44 (0)20 8486 1951 F +44 (0) 20 8947 3373 www.misys.com This email message is intended for the named recipient only. It may be privileged and/or confidential. If you are not the intended named recipient of this email then you should not copy it or use it for any purpose, nor disclose its contents to any other person. You should contact Misys International Banking Systems as shown below so that we can take appropriate action at no cost to yourself. Misys International Banking Systems Ltd,1 St George's Road, London, SW19 4DR, UK. Email: ibs.postmaster@misys.com. Tel: +44 (0) 20 8879 1188 Fax: +44 (0) 20 8947 3373 Misys International Banking Systems Ltd is registered in England and Wales under company no. 971479
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.