Hi,
Its probably a very dumb question but I am stuck.
- I have a vb.net code which writes text to a file on the local machine. The file write has been done sucessfully but being a string data, its writing " (double quotes) in the final string. The file needs to contain only text without any quotes. How can I get away with it?
here's my code :
dim sFileName as string = "testFile.dat"
Dim iFileNum As Integer
iFileNum = FreeFile()
FileOpen(iFileNum, sFileName, OpenMode.Append)
Dim sLine As String
Dim sEmpNum As String
Dim sYear As String = Year(Now)
Dim sMonth As String = Month(Now)
Dim sDay As String = Day(Now)
Dim sHour As String = Hour(Now)
Dim sMinute As String = Minute(Now)
'Build the final string
sLine = sEmpNum & sYear & sMonth & sDay & sHour & sMinute
WriteLine(iFileNum, sLine)
'close the file
FileClose(iFileNum)
=========
The file should have data like:
0000002438200210141042
0000002439200210141042
0000002440200210141042
Its probably a very dumb question but I am stuck.
- I have a vb.net code which writes text to a file on the local machine. The file write has been done sucessfully but being a string data, its writing " (double quotes) in the final string. The file needs to contain only text without any quotes. How can I get away with it?
here's my code :
dim sFileName as string = "testFile.dat"
Dim iFileNum As Integer
iFileNum = FreeFile()
FileOpen(iFileNum, sFileName, OpenMode.Append)
Dim sLine As String
Dim sEmpNum As String
Dim sYear As String = Year(Now)
Dim sMonth As String = Month(Now)
Dim sDay As String = Day(Now)
Dim sHour As String = Hour(Now)
Dim sMinute As String = Minute(Now)
'Build the final string
sLine = sEmpNum & sYear & sMonth & sDay & sHour & sMinute
WriteLine(iFileNum, sLine)
'close the file
FileClose(iFileNum)
=========
The file should have data like:
0000002438200210141042
0000002439200210141042
0000002440200210141042