Results 1 to 3 of 3

Thread: File creation date

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Posts
    183

    File creation date

    I am trying to get the date that a file was created into a character array by using the windows api I have been doing the following:

    static HANDLE h;
    WIN32_FIND_DATA wfd;
    char creation [64];

    h = FindFirstFile ("myfile.c", &wfd);
    sprintf(creation, "%i",wfd.ftCreationTime.dwHighDateTime);

    but all I get is a bunch of garbage, anyone know how I can parse this data up so that it becomes something meaningful?

  2. #2
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  3. #3
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238
    you got to convert the ftCreationTime value to SYSTEMTIME structure with FileTimeToSystemTime API and don't forget to offet with the bias value that you set in your computer regional setting. This can be obtain with GetTimeZoneInformation API.

    regards,
    Chris.C

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width