Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!brutus.cs.uiuc.edu!unix.cis.pitt.edu!yahoo From: yahoo@unix.cis.pitt.edu (Kenneth L Moore) Newsgroups: comp.lang.c Subject: Re: the right time? Message-ID: <21852@unix.cis.pitt.edu> Date: 25 Jan 90 01:35:16 GMT References: <9600004@silver> Reply-To: yahoo@unix.cis.pitt.edu (Kenneth L Moore) Organization: Univ. of Pittsburgh, Comp & Info Services Lines: 21 In article <9600004@silver> sl195102@silver.ucs.indiana.edu writes: =>But I am still having =>trouble with the time function. =>Could someone send me a peice of sample code that will show how many hours =>it is after midnight, in either string or long form. #include #include main() { long timeofday; timeofday = time(0); printf("\n Time and date of program run: \n %s\n",ctime(&timeofday)); } -- I don't yell and I don't tell and I'm grateful as hell: Benny Hill