Re: USING Format for DATES
Posted in 1998
At 02:04 AM 9/9/98 , Peter Lancashire wrote: >Lars Johansson wrote: >> >> Hi c.d.i >> >> Working om Y2K Problems I have encountered a problem >> when using DISPLAY DATEVAR USING "yyyymm". >> The "yyyymm" format has worked in older versions of Informix 4GL, >> that will be version < 6.00. >> Now, on both 6.05.UD1 (DataGeneral) and 7.20.UD1 (Sun Solaris), >> I have the problem that it gives me a empty string but ONLY when linking >> with >> -shared option. The -static linkning works. >> >> I would assume that it must have been a Informix "feature" that the "yyyymm" >> format has ever worked. I suppose that a DATE format always must include >> both Y, M and D parts in the format (otherwise, it wouldn't be a DATE would >> it?) >> But Why does it work on -static linkning ?? >> >> Anyone likes to comment on this ?? >> >> Would there be any work around ?? >> >> Lars Johansson >> SystemConsultant >> Kuwait Petroleum (Danmark) A/S >> lajo@Q8.dk >Sounds like an undocumented "feature". If you really want to have date >precision to one month, just use DATETIME YEAR TO MONTH. Sounds like you are experiencing bug #95015. I believe this is slated to be fixed in the next interim release of 7.20 (eta 10/15/98). -- Jon >I hope you didn't enter dates using this format. All bets are off about >what day of the month might be assumed and whether it changed between >versions. > >A workaround (in 4GL, not tested) is to do this: > >DEFINE text_date CHAR(6) >DEFINE mydate DATE > >LET text_date = mydate USING "yyyymmdd" > >DISPLAY text_date ... >-- >Peter Lancashire >Information Systems Specialist, Bayer plc >Eastern Way, Bury St Edmunds, Suffolk, IP32 7AH, UK >Tel: +44-1635-562258, Fax: +44-1635-562281 >--- >If all else fails, read the instructions AND the release notes. >All opinions are my own and not those of Bayer plc. >My Internet plumbing does not allow me to mail and post news together. >Sorry. >--- >Join Infuse, the UK Informix User Group at http://www.infuse.org.uk/ ----------------------------------------------------------------------- Jon C. Vemo jon@etcscan.com Database/System Administration Deluxe Payment Protection Systems/SCAN Bothell, WA (425) 489-1120 -----------------------------------------------------------------------