473,503 Members | 7,214 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

RowFilter on Date Field from XML WebService

I have a dataset which is populated from a webservice.

I want to filter a date field using DateTimePickers, but this just
produces an error..

'###########################################
If chkDateFilter.Checked Then

d = calDateFrom.Value.ToString
d = d.Substring(0, 10)

s += "OrderDate >= #" & d & " 00:00:00# AND "

d = calDateTo.Value.ToString
d = d.Substring(0, 10)

s += " OrderDate <= #" & d & " 23:59:59#"

End If

dsH.Tables(0).DefaultView.RowFilter = s
'##########################################

The error i recieve is ' String was not recognized as a valid
DateTime.'

Any ideas?

Nov 21 '05 #1
2 1370
have fixed this problem.. had to convert the date to MM/DD/YYYY
format.... very gay !!

Nov 21 '05 #2
Hi,

There's just a small problem with this approach... IF you run the code
in a machine with a different Regional Settings if will crash. I'd
recomend convertinda the date to an ISO format i.e. yyyy-MM-dd HH:mm:ss

Regards,

Paulo

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
522
by: Jim Heimer | last post by:
When I use the dataview.rowfilter and I try to display the field value of the first row, the code doesn't seem to show the first row AFTER the rowfilter. This is my code: DataView...
1
2370
by: Manoj Paramu Das | last post by:
I have loaded an xml file to a dataset and one of the fields being "UserDate" and has date values like <UserDate>2005-01-01T00:00:00.0000000-05:00</UserDate> I am trying to apply a row filter to...
8
3869
by: Dave Hagerich | last post by:
I'm using a DataGrid with a DataSet and I'm trying to filter the data being displayed, using the following code as a test: DataView theView = new DataView(theDataSet.Tables); theView.RowFilter =...
10
11149
by: Roy Lawson | last post by:
Can anyone explain the difference between RowStateFilter and RowFilter properties of the DataView objects in simple terms? I am going through a Transcender practice exam and just when I think I...
0
972
by: Martin | last post by:
Hi, I want to filter on a date column of my view. I use the following syntax : MyDataset.MyTable.DefaultView.RowFilter = "MyDateColumn >= #" & StartingDate & "# and MyDateColumn <= #" &...
1
1097
by: WStoreyII | last post by:
i have a column that is transaction date the datatype is set to date for the column my question is i need to set a row filter that will show all the dates that contain a certain year and month ...
1
13081
by: hoadley | last post by:
I am filtering a data table using the defaultView.rowFilter but when I filter a column of type "dateTime" it throws an exception saying " operator >= can not be used on type dateTime and type...
1
3144
by: Luis Mendes | last post by:
I have a Table wicth as the Field: Date in the Date/Time format and stores data like dd-MM-yyyy hh:mm:ss. I can I set the Dataview.Rowfilter to filteran especific date no mathers the Time? I've...
3
7304
by: steffen.trommer | last post by:
Dear VB experts, how can i set a rowfilter to a Dataview that filters the data from a startdate to a enddate? I tried this, but whithout success: Me.CurDataViewStatistik.RowFilter =...
0
7207
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7291
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7012
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7468
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5598
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5023
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
1522
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
402
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.