473,383 Members | 1,801 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

RowFilter on Date field



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 this field and it doesn't seem to work

dvCMonth.RowFilter = "Month(UserDate)=" & Now().Month

dvCMonth.RowFilter = "Month(UserDate)='4'"

no matter what I try, it doesn't work however, Any help would be appreciated
and thanks in advance.
Manoj Das
Nov 19 '05 #1
1 2368
Hi Manoj ,

Unfortunately DataView.RowFilter doesn’t support Month function. So you have
to use other way to figure it out. For example, you can try

dvCMonth.RowFilter = "UserDate >='1/" & Date.Today.Month.Tostring & "/" &
Date.Today.Year & "' AND UserDate < "'1/" &
Date.Today.AddMonths(1).Month.Tostring & "/" & Date.Today.Year & "'"

HTH

Elton Wang
el********@hotmail.com

"Manoj Paramu Das" wrote:


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 this field and it doesn't seem to work

dvCMonth.RowFilter = "Month(UserDate)=" & Now().Month

dvCMonth.RowFilter = "Month(UserDate)='4'"

no matter what I try, it doesn't work however, Any help would be appreciated
and thanks in advance.
Manoj Das

Nov 19 '05 #2

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

Similar topics

1
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
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
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
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
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
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...
2
by: Winshent | last post by:
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...
1
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
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 =...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.