Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Opening a CSV File [modified]

Opening a CSV File [modified]

Scheduled Pinned Locked Moved C#
helpdatabase
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    ndeza
    wrote on last edited by
    #1

    Hi All, I've got an application that opens a csv file and save the data in the file to a Database. When the app reads the file it only reads the second column my problem is, the format of the date in the file has changed the date use to be like, 20081019 now it has changed to "October 26, 2008",. The file is like Day,Visitors "October 26, 2008",356 where day is the date. Now the app reads year 2008 when i want it to read the Visitors 356. Please can you help me:):) Regards, Ndeza

    modified on Tuesday, October 28, 2008 4:52 AM

    R V 2 Replies Last reply
    0
    • N ndeza

      Hi All, I've got an application that opens a csv file and save the data in the file to a Database. When the app reads the file it only reads the second column my problem is, the format of the date in the file has changed the date use to be like, 20081019 now it has changed to "October 26, 2008",. The file is like Day,Visitors "October 26, 2008",356 where day is the date. Now the app reads year 2008 when i want it to read the Visitors 356. Please can you help me:):) Regards, Ndeza

      modified on Tuesday, October 28, 2008 4:52 AM

      R Offline
      R Offline
      Rajesh R Subramanian
      wrote on last edited by
      #2

      Who has the time to go through all that rubbish? Please post only "relevant" code, if required. Read the guidelines before posting a question.

      It is a crappy thing, but it's life -^ Carlo Pallini

      N 1 Reply Last reply
      0
      • R Rajesh R Subramanian

        Who has the time to go through all that rubbish? Please post only "relevant" code, if required. Read the guidelines before posting a question.

        It is a crappy thing, but it's life -^ Carlo Pallini

        N Offline
        N Offline
        ndeza
        wrote on last edited by
        #3

        How about now

        1 Reply Last reply
        0
        • N ndeza

          Hi All, I've got an application that opens a csv file and save the data in the file to a Database. When the app reads the file it only reads the second column my problem is, the format of the date in the file has changed the date use to be like, 20081019 now it has changed to "October 26, 2008",. The file is like Day,Visitors "October 26, 2008",356 where day is the date. Now the app reads year 2008 when i want it to read the Visitors 356. Please can you help me:):) Regards, Ndeza

          modified on Tuesday, October 28, 2008 4:52 AM

          V Offline
          V Offline
          Vikram A Punathambekar
          wrote on last edited by
          #4

          Not sure I understand... but you're saying the CSV actually has the enclosing quotes? Then it is the app which fails to parse properly. There are libraries that handle CSV files, you're better off using one of them.

          Cheers, Vıkram.


          "You idiot British surprise me that your generators which grew up after Mid 50s had no brain at all." - Adnan Siddiqi.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups