VB.NET Question: io.streamwriter

Discussion in 'OT Technology' started by deesee22, Apr 18, 2006.

  1. deesee22

    deesee22 Habs Crew OT Supporter

    Joined:
    Mar 23, 2004
    Messages:
    13,617
    Likes Received:
    11
    Location:
    Canada
    Im just trying to write a little app here to keep track of phone calls in a text file.

    I was thinking of having a Time/Date picker and then set the streamwriter to write to the current date. but is this possible?

    I tried this
    Dim currentdate As String = CStr(DateTimePicker1.Text)
    Dim sw As IO.StreamWriter = IO.File.AppendText((currentdate.txt))

    and i cant get it to work

    Im a beginner here, so if anyone could help me out thatd be awesome
     
  2. Yep

    Yep Knick knack paddy whack, give the old dog a bone

    Joined:
    Jan 22, 2001
    Messages:
    4,603
    Likes Received:
    0
    Location:
    South Jersey
    This overwrites the file data but you should be able to adapt it.

    Dim SW As StreamWriter
    SW = New StreamWriter(Application.StartupPath & "\" & Replace(strFTPPath, "/", "_"))
    SW.Write(strServerVersion)
    SW.Close()
     

Share This Page