Results 1 to 4 of 4

Thread: FileDateTime ???

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Posts
    30
    I know how to use the FileDateTime function (which returns mmm/dd/yy tt:tt). I would like to know how I can get it to return the date the file was created in the format (Month Day, Year) completely spelled out (ex. October 5, 2000).

    Thanks,
    Brandr

  2. #2
    Addicted Member S@NSIS's Avatar
    Join Date
    Aug 2000
    Location
    Stoke-On-Trent, England
    Posts
    243
    Try this..
    Code:
    MyDate = Format(FileDateTime("c:\whatever.xxx"), "Long Date")
    hope this helps

    Shaun

  3. #3
    Addicted Member
    Join Date
    May 2000
    Posts
    188
    Just be aware that FileDateTime is the last modified date/time not the created unless the file has not been modified.

  4. #4
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Code:
    'file information using File Scripting Object (fso)
    'date created...
    
     Private Sub Form_Load()
     
     Dim sFile As String
     Dim myDate As String
     
     sFile = "c:\my documents\try.txt"
     
     Dim fso As Object
     Set fso = CreateObject("Scripting.FileSystemObject")
     myDate = fso.getfile(sFile).datecreated
     myDate = Format(myDate, "Long Date")
    
     MsgBox "The file " & sFile & " was created on: " & myDate
     
     Unload Me
    
    End Sub
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

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