Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!think!husc6!husc4!huang From: huang@husc4.HARVARD.EDU (Howard Huang) Newsgroups: comp.sys.apple Subject: Re: date converter Message-ID: <1184@husc6.harvard.edu> Date: 9 Jan 90 17:33:17 GMT References: <1990Jan7.165450.29589@mintaka.lcs.mit.edu> Sender: news@husc6.harvard.edu Reply-To: huang@husc4.UUCP (Howard Huang) Organization: Harvard University Science Center Cambridge, MA Lines: 20 >Does anyone have a quick and dirty algorithm for converting a date >stored as a certain number of seconds to MM/DD/YY HH:MM:SS and >vice-versa? Thanks. > >-- >Dave Whitney >dcw@sun-bear.lcs.mit.edu ...!mit-eddie!sun-bear!dcw dcw@athena.mit.edu The GS may have a toolbox routine for doing this. I think the Mac (Ha!) does. ANSI C is supposed to support the conversion of seconds, but I believe the actual details are machine-dependent. The Mac, for example, stores seconds since Jan. 1, 1900 or 1901. If all else fails, you can do a bunch of divides and modulos :^) Howard C. Huang huang@husc4.harvard.edu