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
  1. Home
  2. Web Development
  3. ASP.NET
  4. fetching records from excel on the basis of date given by user.

fetching records from excel on the basis of date given by user.

Scheduled Pinned Locked Moved ASP.NET
tutorialquestion
1 Posts 1 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.
  • M Offline
    M Offline
    MissionSuccess
    wrote on last edited by
    #1

    Hello All How can i fetch the records from an excel sheet for a particular date. i want to pass the date from frontend and fetch only those records which satisfy the condition. my code is:---------- strConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strFilePath + ";Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1""" Dim cnCSV As New OleDbConnection(strConnectionString) cnCSV.Open() 'Dim cmdSelect As New OleDbCommand("SELECT * FROM [sheet1$] where [Tube Dia]=22", cnCSV) Dim cmdSelect As New OleDbCommand("SELECT * FROM [sheet1$] where [Invoice date]='14/04/2006'", cnCSV) cmdSelect.CommandType = CommandType.Text Dim daCSV As New OleDbDataAdapter daCSV.SelectCommand = cmdSelect Dim ds As New DataSet daCSV.Fill(ds) Oledb is treating my date as string how to convert my string parameter('14/04/2006') to date.

    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