Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!ukc!icdoc!sot-ecs!amf From: amf@ecs.soton.ac.uk (Andrew Fountain) Newsgroups: comp.windows.ms Subject: Re: Need autosave macro for Winword Message-ID: <7906@ecs.soton.ac.uk> Date: 31 May 91 12:17:24 GMT References: <1991May30.063956.9027@cunixf.cc.columbia.edu> Sender: news@ecs.soton.ac.uk Lines: 24 In <1991May30.063956.9027@cunixf.cc.columbia.edu> gg2@cunixf.cc.columbia.edu (Guy Gallo) writes: I think there is a bug here. If the time *was* between 11:56am and 11:59am, then after adding 4 mins the time will be between 12.00 and 12.03 but still be "am". It will have 12 added to it to make it 24.0x I think the solution is to do the conversion from 12 to 24 hour clock *before* adding in the 4 mins. >If min > 59 Then > min = min - 60 > hour = hour + 1 > End If >If ap$ = "PM" And hour <> 12 Then > hour = hour + 12 > End If >If hour = 24 Then > hour = 0 > End If -- amf@ecs.soton.ac.uk Dr. Andrew Fountain Tel: +44 703 592831 Dept of Electronics and Computer Science Fax: +44 703 593045 University of Southampton Telex: 47661 SOTONU G Southampton SO9 5NH England