FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour getftime() does not work...Heres a workaround
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
getftime() does not work...Heres a workaround
Posted: Fri Dec 31, 2010 07:33 PM
I contacted james Bott to check my concern that getFtime() produces the wrong time.
His was off 16hrs mine was 8 hrs. Thanks to james here is a workaround.

Code (fw): Select all Collapse
// File time
// Returns nil if cFile not found
function ftime(cFile)
   local aDir,cTime
   if cFile != nil
      aDir:= directory(cFile)
      if len(aDir) = 1
         cTime:= aDir[1][4]
      endif
   endif
return cTime
 
// File date
// Returns nil if file not found
function fdate(cFile)
   local aDir,dDate
   if cFile != nil
      aDir:= directory(cFile)
      if len(aDir) = 1
         dDate:= aDir[1][3]
      endif
   endif
return dDate



Happy New Year to all.
Thank you

Harvey

Continue the discussion