Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7056241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:50:38+00:00 2026-05-28T03:50:38+00:00

Example Data Link – Sorry, wouldn’t format correctly when pasted. 1. Dec 01, 2011

  • 0

Example Data Link – Sorry, wouldn’t format correctly when pasted.

1.
 Dec 01, 2011
 06:00:00 AM
 Dec 01, 2011
 07:05:00 AM
 65
2.11
2.
 Dec 01, 2011
 06:00:00 PM
 Dec 01, 2011
 07:05:00 PM
 65
2.11
3.
 Dec 02, 2011
 06:05:00 AM
 Dec 02, 2011
 07:05:00 AM
 60
1.95

I’d like each separate line to have its own place in an array or datatable, but I can’t seem to get it to work correctly. There must be something different with the ending characters?

Code is below:

Dim strOutput As String = ""

'' Demo Data
'Dim strData As String = "59. Dec 01, 2011 06:05:00 PM Dec 01, 2011 10:05:00 PM 240 80.00"
'strOutput = +FormatRow(strData)
'' Demo Data

Dim sFileName As String = OpenFileDialog.FileName
If My.Computer.FileSystem.FileExists(sFileName) Then
    Dim srFileReader As System.IO.StreamReader
    Dim sInputLine As String
    srFileReader = System.IO.File.OpenText(sFileName)
    sInputLine = srFileReader.ReadLine()

    Do Until sInputLine Is Nothing
        'strOutput = +FormatRow(sInputLine)
        Dim title As String = srFileReader.ReadLine()
        Dim startTime As DateTime = srFileReader.ReadLine() & " " & srFileReader.ReadLine()
        Dim endTime As DateTime = srFileReader.ReadLine() & " " & srFileReader.ReadLine()
        Dim timeSpan As TimeSpan = endTime.Subtract(startTime)
        Dim minutesTotal As Integer = timeSpan.TotalMinutes
        ' Burn Minutes
        srFileReader.ReadLine()
        Dim billMinutes As Integer = minutesTotal
        Dim billTotal As Double = srFileReader.ReadLine()

        strOutput += ""
    Loop

Output something like:

12/1/2011 6:00:00 AM    12/1/2011 7:05:00 AM    65  65      2.11
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T03:50:39+00:00Added an answer on May 28, 2026 at 3:50 am

    You have read while text file at once and I think File.ReadAllLines will be good choice.

     Dim str
     Dim fileName = "C:\SampleData.txt"
    
     Dim lines() = File.ReadAllLines(fileName)
    
     For i = 0 To lines.GetUpperBound(0) Step 7
      str = String.Format("{0}{1}{2}{3}{4}{5}", 
                         lines(i), lines(i + 1), lines(i + 2), lines(i + 3), 
                         lines(i + 4), lines(i + 5))
      Console.WriteLine(str)
     Next
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Which is a better design approach: Having separate link/association tables for each type of
I normally get Facebook JSON data that look like this (taken from an example):
$.get('example.com',function(data){ link = $(data #someid).attr(href) // how to do this??? }) I load a
Is this link sufficent for example for input filtering form data? With a post
Here is some example data: data = data.frame(series = c(1a, 1b, 1e), reading =
Given the following example data: Users +--------------------------------------------------+ | ID | First Name | Last
I have following structure with example data: id season_id title 1 1 Intro 2
How can you sort the following word by the given rule? Example data is
ex: <a><strike>example data in here</strike></a> I want everything inside the a tag, to the
The Java data type byte for example holds data from -128 to 127 in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.