How to print current data and time to text file

D

Dayanand

Hi All
Any body can guide me How to print current data and time to text file in Visual Basic..

Regard
Dayanand
 
S

Steve Garman

Are you looking for somethig like this?

Sub test()
Dim ff As Integer, timDat As String
ff = FreeFile
Open "c:\test.txt" For Append As ff
timDat = Format(Now, "dd mmm yyyy, hh:mm:ss")
Print #ff, timDat
Close ff
End Sub
 
Top