[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]
Sam Grabham wrote: > Hi > > In C++ how should i compare dates as in the following: > > I have been using these headers > #include <sys/types.h> > #include <sys/stat.h> > > struct stat fileInfo; > std::ctime(&fileInfo.st_mtime); > > so how should i compare now, as in time() and the file modified date? > > I wish to calc how many minutes old a file is > > How would i convert say a string to a date? > > would you use difftime in some way? (fDif = difftime > (fi.fileModifiedDate("C:\\temp\\test\\Project1.dev"),now); ) > > > Regards > > > Sam There is a CTime class somewhere - but that should have all the bits you need? Tom te tom te tom -- The Mailing List for the Devon & Cornwall LUG http://mailman.dclug.org.uk/listinfo/list FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html