View Single Post
Old May 1st, 2007, 3:39 PM   #4
randum77
Programmer
 
randum77's Avatar
 
Join Date: Jun 2006
Location: Fayettehell, NC
Posts: 56
Rep Power: 3 randum77 is on a distinguished road
Just wanted to check back in with everyone. I doubt it matters much but I got things figured out. I started digging through the MSDN and here is what I came up with.

Dim fso, MyFile, strFileLoc
Dim currDate, currTime, currMonth, currMonAbr, currDay, currYear

strfileloc = "\\servername\location\testfile1.txt"
currDate = date
currTime = time
currDay = day(currdate)
currYear = year(currdate)
currMonth = Month(now)
currMonAbr = MonthName(currmonth, true)


   Set fso = CreateObject("Scripting.FileSystemObject")

   Set MyFile = fso.CreateTextFile(strFileLoc, True)

   MyFile.WriteLine("TagNameHere" & "|" & currDay & "-" & currMonabr & "-" & currYear & " " & currtime)

   MyFile.Close

I might still have to figure out how to change the time from 12 to 24 hour time. The only way I can figure that is to use the hour, min, and sec function then search the string for AM or PM and add 12 to the hour if necessary. Then finish the write w/ Hour & Min & Sec.

__________________
_Marshall_

"America has bred a society that is innocent and incapable of accepting responsibility, but yet, is able to place blame on others without guilt."
randum77 is offline   Reply With Quote