Click here to Skip to main content
15,890,995 members
Home / Discussions / C#
   

C#

 
GeneralRe: c# combo box binding Pin
Pubudini3424-May-12 6:45
Pubudini3424-May-12 6:45 
GeneralRe: c# combo box binding Pin
Pubudini3424-May-12 8:02
Pubudini3424-May-12 8:02 
SuggestionRe: c# combo box binding Pin
Cracked-Down24-May-12 19:06
Cracked-Down24-May-12 19:06 
QuestionC# - Email Account Verification Pin
Cristian Capannini24-May-12 0:19
Cristian Capannini24-May-12 0:19 
AnswerRe: C# - Email Account Verification Pin
Richard MacCutchan24-May-12 3:10
mveRichard MacCutchan24-May-12 3:10 
QuestionC# windows service.. Pin
babasateesh23-May-12 23:53
babasateesh23-May-12 23:53 
AnswerRe: C# windows service.. Pin
Ravi Bhavnani24-May-12 2:11
professionalRavi Bhavnani24-May-12 2:11 
QuestionDate filter in DataView Pin
Paul Bullimore23-May-12 22:11
Paul Bullimore23-May-12 22:11 
I am trying to do a simple filter between two dates using a DataView. I have read that the format of the date string is important and have had good results using the ToShortDateString() method:

string filter = " (Date >= #" + Convert.ToDateTime(dateTimePicker1.Text).ToShortDateString() + "# And Date <= #" + Convert.ToDateTime(dateTimePicker2.Text).ToShortDateString() + "# ) ";


This gives the string "
filter = " (Date >= #04/05/2012# And Date <= #16/05/2012# )
"

"But, the filter reports a "String was not recognized as a valid DateTime." error if the day value is more than 12. The filtering is OK at day 12 and below.
If I change the date format the filter does not operate correctly.

My system is in en-GB culture.
The source table is a local DataTable.

Has anyone seen this type of problem?

Paul.
AnswerRe: Date filter in DataView Pin
Eddy Vluggen24-May-12 0:31
professionalEddy Vluggen24-May-12 0:31 
GeneralRe: Date filter in DataView Pin
BobJanova24-May-12 0:51
BobJanova24-May-12 0:51 
AnswerRe: Date filter in DataView Pin
Eddy Vluggen24-May-12 1:00
professionalEddy Vluggen24-May-12 1:00 
GeneralRe: Date filter in DataView Pin
Paul Bullimore24-May-12 1:46
Paul Bullimore24-May-12 1:46 
AnswerRe: Date filter in DataView Pin
Luc Pattyn24-May-12 3:01
sitebuilderLuc Pattyn24-May-12 3:01 
AnswerRe: Date filter in DataView Pin
Paul Bullimore24-May-12 21:22
Paul Bullimore24-May-12 21:22 
QuestionCan I use Font like a photoshop? Pin
Member 832808023-May-12 15:51
Member 832808023-May-12 15:51 
AnswerRe: Can I use Font like a photoshop? Pin
OriginalGriff23-May-12 19:25
mveOriginalGriff23-May-12 19:25 
GeneralThanks you for your advise. but I can't use this way. Pin
Member 832808023-May-12 23:14
Member 832808023-May-12 23:14 
GeneralRe: Thanks you for your advise. but I can't use this way. Pin
BobJanova24-May-12 0:52
BobJanova24-May-12 0:52 
GeneralRe: Thanks you for your advise. but I can't use this way. Pin
Pete O'Hanlon24-May-12 1:21
mvePete O'Hanlon24-May-12 1:21 
QuestionLooking for help querying active directory Pin
turbosupramk323-May-12 9:08
turbosupramk323-May-12 9:08 
AnswerRe: Looking for help querying active directory Pin
Dave Kreskowiak23-May-12 9:58
mveDave Kreskowiak23-May-12 9:58 
GeneralRe: Looking for help querying active directory Pin
turbosupramk323-May-12 10:23
turbosupramk323-May-12 10:23 
GeneralRe: Looking for help querying active directory Pin
Dave Kreskowiak23-May-12 12:09
mveDave Kreskowiak23-May-12 12:09 
GeneralRe: Looking for help querying active directory Pin
turbosupramk323-May-12 14:29
turbosupramk323-May-12 14:29 
AnswerRe: Looking for help querying active directory Pin
randprin24-May-12 2:16
randprin24-May-12 2:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.