Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to get FileTime?

How to get FileTime?

Scheduled Pinned Locked Moved C / C++ / MFC
questiontutorial
4 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Monisankar
    wrote on last edited by
    #1

    Using GetFileTime(),can get the last-modified time of a file.i need actually the elapsed time.how can i get?

    D 1 Reply Last reply
    0
    • M Monisankar

      Using GetFileTime(),can get the last-modified time of a file.i need actually the elapsed time.how can i get?

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Monisankar wrote: i need actually the elapsed time Elapsed time? I can only assume you mean last_modified_time - create_time. Is that correct?


      "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

      M 1 Reply Last reply
      0
      • D David Crow

        Monisankar wrote: i need actually the elapsed time Elapsed time? I can only assume you mean last_modified_time - create_time. Is that correct?


        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

        M Offline
        M Offline
        Monisankar
        wrote on last edited by
        #3

        Actyally i need the intervals that have elapsed since 1601 and want to get this value as unsigned long.What should i do?

        D 1 Reply Last reply
        0
        • M Monisankar

          Actyally i need the intervals that have elapsed since 1601 and want to get this value as unsigned long.What should i do?

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          FILETIME ftCreate,
          ftLocal;
          GetFileTime(hFile, &ftCreate, ...);
          FileTimeToLocalFileTime(&ftCreate, &ftLocal);

          FILETIME ftSystem;
          SYSTEMTIME st;
          GetSystemTime(&st);
          SystemTimeToFileTime(&st, &ftSystem);

          Now you can compare ftLocal with ftSystem.


          "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups