Re: MORE ON DATE/TIME
Posted in 1999
Well, it's simple (really simple) in IDS 7.3: select TO_CHAR(CURRENT, "%H%M%S") from systables or (I think it will work in SPL, but I didn't checked it up): let currentTime = to_char(CURRENT, "%H%M%S"); Of course the CURRENT evaluation in SPL is another story (may be I'm wrong but as I understood it is evaluated just once in a stored procedure). Best Regards, Octav On Thu, Apr 22, 1999 at 06:30:34AM +0000, Obnoxio The Clown wrote: > From: Aurelio <i52sacaa@uco.es> > > >I still have problems with date/time: > > > >How can I do this? > >define currentTime CHAR(8); > >let currentTime = to_char(CURRENT,[format for having hhhhmmss]); > > > >OR, at least, > > > >let hours = HOUR(CURRENT); > >let min = MINUTE(CURRENT); > >let secs = SECONDS(CURRENT); > > > >let currentTime = hours || min || secs; > > > >These functions doesn't exist, but are there others? (IDS 7.3) > > I haven't tried this, but for the first one try: > > LET currentTime = EXTEND(CURRENT, HOUR TO SECOND) > > The second can be implement similarly: > LET hours = EXTEND(CURRENT, HOUR TO HOUR) > LET min = EXTEND(CURRENT, MINUTE TO MINUTE) > LET secs = EXTEND(CURRENT, SECOND TO SECOND) > > ... > > IDS also has a TOCHAR function for handling dates, but the manual is a > little fuzzy, if anyone has used it and can give an example, I'd also > be interested. > > Aurelio, I might also note that *all* of this was taken out of TFM. > You may want to R it at some stage... :-) > > ______________________________________________________ > Get Your Private, Free Email at http://www.hotmail.com -- Octav Chiriac Phone: (373) 2 21 20 96 NetInfo S.R.L. Fax: (373) 2 21 36 59 Chisinau (373) 2 24 00 83 Moldova, Republic of mailto:com@netinfo-moldova.com