How to search by date in an xml file and display it on a datagrid in vb.net.

A

Avatar Viper

I have an xml file:

<?xml version="1.0"?>
<ProductList>
<Products>
<SKU>1</SKU>
<Price>100.00</Price>
<Description>Widget #1</Description>
<pubDate>8/6/2004</pubDate>
</Products>
<Products>
<SKU>2</SKU>
<Price>10.00</Price>
<Description>Widget #2</Description>
<pubDate>8/6/2004</pubDate>
</Products>
<Products>
<SKU>3</SKU>
<Price>30.00</Price>
<Description>Widget #3</Description>
<pubDate>8/5/2004</pubDate>
</Products>
</ProductList>

Assume today date is 8/6/2004.

I have tried RowFilter = "pubDate = ‘"+Date.Today+"'"
and the Find method in DataView and then display it in on a datagrid
but to no avail why???
 
G

Guest

Date.Today is going to return "8/6/2004 12:00:00 AM".
Date.Today.ToShortDateString should return "8/6/2004"; try that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,062
Latest member
OrderKetozenseACV

Latest Threads

Top