Re: convert value of 'connected' from syssessions
Posted in 1997
Try something along the lines of: #include <time.h> =20 time_t now=3Dtime(NULL); struct tm theTime ; struct tm* pTime ; int nDate=3D0 ; nDate =3D atol ( p_tor_requesttime ) ; /* Set the Date and time values...*/ pTime =3D (struct tm *)gmtime_r( (time_t *)&nDate, &theTime ); sprintf(p_tor_requesttime, "%d:%d:%d",theTime.tm_hour, = theTime.tm_min, theTime.tm_sec); sprintf(p_tor_requestdate, "%2d/%2d/%d",theTime.tm_mday, = theTime.tm_mon, theTime.tm_year+1900); -----Original Message----- From: Peter Wang [SMTP:peter_wang@yes.optus.com.au] Sent: Tuesday, April 29, 1997 9:07 AM To: Informix practicianers Subject: convert value of 'connected' from syssessions Hi all, Has anyone tried to convert the value of column 'connected' in table = syssessions (sysmaster database) into more meaningful date time format = in a SQL statement? For example: 862295401 -> 1997-04-29 15:33:42 (something like that) (It seems that the integer value represents seconds from 1970-01-01 = 00:00:00) Any tips are appreciated. Cheers. Peter