How to get DateTime stamp of a textfile using VB 6

How do you obtain the DateTime stamp of a textfile using VB 6.0? By DateTime stamp I mean the date & time the textfile was created or modified. Sample code would be appreciated. Thanks.


For created/last modified you can simply;

dateVar = FileDateTime("c:\foo\bar\qux.file")


Use the GetFile method in FileSystemObject and then just use the DateCreated and 'DateLastModified' properties of it.

Here's the documentation with a sample for how to do it from VBscript (pretty much the same from VB6):



You want the FileSystemObject from the scripting run time.

MS gives an example of getting the creation time

Note that example works in VBScript as well in VB6 you can get the file by http://msdn.microsoft.com/en-us/library/aa716288(VS.60).aspx


Dim fso As New FileSystemObject, fil As File Set fil = fso.GetFile("c:\test.txt")


How about this:

Dev X : get datetime in VB6


  • Can't call VBA built in function with Application.Run
  • How can I assign result from completion handler to a variable?
  • MS Access DLookUp malfunction
  • Convert Date to String in format dd-mmm-yyyy [duplicate]
  • Align columns against one another by row
  • No orientation in exif data - PHP image upload
  • optimisticconcurrencyexception was caught when updating entity relation using stub entities
  • Is there a version of Ruby's Regexp.match that responds to the order of the matches within the
  • Preventing infinite loop data retrieval with Hibernate
  • Merge multiple data frames with different dimensions using Pandas
  • How do you generate the signature for an Azure Blob storage SAS token in Python?
  • Configure Spring's MappingJacksonHttpMessageConverter
  • BeautifulSoup difference between findAll and findChildren
  • How to retrieve information from antrun back to maven?
  • Setting the run time properties on SpringApplicationBuilder()
  • How to create CGPath from a SKSpriteNode in SWIFT
  • Xstream to map “choice” elements of XML
  • WPF Visiblity Binding to Boolean Expression with multiple Variables
  • Spring Cloud Microservice Architecture Confusion
  • How does document.ready work with angular element directives?
  • WPF ICommand CanExecute(): RaiseCanExecuteChanged() or automatic handling via DispatchTimer?
  • Not able to aggregate on nested fields in elasticsearch
  • How solve “Qt: Untested Windows version 10.0 detected!”
  • gspread or such: help me get cell coordinates (not value)
  • How do I exclude a dependency in provided scope when running in Maven test scope?
  • Meteor helpers not available in Angular template
  • Q promise. Difference between .when and .then
  • Align navbar back button on right side
  • Window Size for Mac application
  • Javascript Callbacks with Object constructor
  • How can I use Kendo UI with Razor?
  • Build own AppleScript numerical error handling
  • Run Powershell script from inside other Powershell script with dynamic redirection to file
  • VB.net deserialize, JSON Conversion from type 'Dictionary(Of String,Object)' to type '
  • Load html files in TinyMce
  • How can I get HTML syntax highlighting in my editor for CakePHP?
  • C# - Getting references of reference
  • coudnt use logback because of log4j
  • java string with new operator and a literal
  • How to push additional view controllers onto NavigationController but keep the TabBar?