View Full Version : How do you write a date to a text file?
01-09-2008, 07:55 PM
I am writing data to a text file but don't know what script to use to pass a date to the text file. Any help would be greatly appreciated.
01-10-2008, 11:37 AM
show us what you have this far..
01-12-2008, 07:31 PM
Look at the FileSystemObject (http://www.w3schools.com/asp/asp_ref_filesystem.asp) and the Date() function.
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set textStream = fso.OpenTextFile(Server.MapPath("file.txt"), 2, True)
Set textStream = Nothing
Set fso = Nothing
You must have write permissions on the directory in order to do this.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.