Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Last accessed time...

saktiiisaktiii Member Posts: 1
I want to compare the last accessed time of two files and get the older one.I use asctime(localtime(&sbuf.st_atime)) who gives back a char of the type "Sun Jan 3 15: 14: 13 2003".How can i compare this type?Any ideas?Thanx

Comments

  • stoberstober Member Posts: 9,765 ✭✭✭
    : I want to compare the last accessed time of two files and get the older one.I use asctime(localtime(&sbuf.st_atime)) who gives back a char of the type "Sun Jan 3 15: 14: 13 2003".How can i compare this type?Any ideas?Thanx
    :
    :
    [blue]since st_atime is just an integer all you have to do is to an integer compare -- no need to convert it to anything at all.[/blue]
Sign In or Register to comment.