Click here to Skip to main content
16,011,475 members
Home / Discussions / C#
   

C#

 
AnswerRe: Summer Code Compettion Entry Information Pin
Pete O'Hanlon12-Aug-08 9:18
mvePete O'Hanlon12-Aug-08 9:18 
AnswerRe: Summer Code Compettion Entry Information Pin
Thomas Stockwell14-Aug-08 2:09
professionalThomas Stockwell14-Aug-08 2:09 
QuestionEvent handling in C# Pin
TheComputerMan12-Aug-08 5:38
TheComputerMan12-Aug-08 5:38 
AnswerRe: Event handling in C# Pin
J4amieC12-Aug-08 5:59
J4amieC12-Aug-08 5:59 
GeneralRe: Event handling in C# Pin
TheComputerMan12-Aug-08 6:11
TheComputerMan12-Aug-08 6:11 
QuestionBest DJ software to control? Pin
BobbyWhiskey12-Aug-08 5:28
BobbyWhiskey12-Aug-08 5:28 
QuestionWebbrowser and dialog boxes Pin
Dewald12-Aug-08 5:27
Dewald12-Aug-08 5:27 
QuestionProblem with Invalid Date Pin
Reality Strikes12-Aug-08 5:23
Reality Strikes12-Aug-08 5:23 
I'm facing some issues with the date thing:

While debugging, I can see that the value of stringDate is coming as "3/60/1989" (MM/DD/YYYY), which is practically not possible, but these value is coming from the database as it is wrongly entered there.

Now when this stringDate is parsed into DateTime format, it gives me a different date (i.e. the value of dtDate is shown as "6/30/1989") and throws an exception "Invalid DateTime Entry" at this line:

dtDate = DateTime.Parse(stringDate);

if (dtDate > startDate && dtDate < endDate)
{
	row["NEW_DATE_FIELD"] = stringDate;
	myTable.ImportRow(row);						
}


So, now I want that my code to do the following: To enter a "INVALID DATE" message to the row["NEW_DATE_FIELD"] instead of the wrong date as such

Note : In VB.NET we have a built-in method named IsDate(), which receives a string as parameter and return True if the string is a date or false. Is there any short-cut method in C# equivalent to IsDate method ?

Any help would be appreciated.
AnswerRe: Problem with Invalid Date Pin
J4amieC12-Aug-08 5:28
J4amieC12-Aug-08 5:28 
GeneralRe: Problem with Invalid Date Pin
Reality Strikes12-Aug-08 8:01
Reality Strikes12-Aug-08 8:01 
GeneralRe: Problem with Invalid Date Pin
Alan N12-Aug-08 8:52
Alan N12-Aug-08 8:52 
GeneralRe: Problem with Invalid Date Pin
Reality Strikes12-Aug-08 9:10
Reality Strikes12-Aug-08 9:10 
GeneralRe: Problem with Invalid Date Pin
Alan N13-Aug-08 6:50
Alan N13-Aug-08 6:50 
QuestionAccessing Variables in a c# windows application Pin
Rome'12-Aug-08 5:21
Rome'12-Aug-08 5:21 
AnswerRe: Accessing Variables in a c# windows application Pin
Manas Bhardwaj12-Aug-08 5:28
professionalManas Bhardwaj12-Aug-08 5:28 
GeneralRe: Accessing Variables in a c# windows application Pin
Rome'12-Aug-08 5:33
Rome'12-Aug-08 5:33 
GeneralRe: Accessing Variables in a c# windows application [modified] Pin
c242312-Aug-08 5:39
c242312-Aug-08 5:39 
GeneralRe: Accessing Variables in a c# windows application Pin
Rome'12-Aug-08 6:01
Rome'12-Aug-08 6:01 
GeneralRe: Accessing Variables in a c# windows application Pin
TheComputerMan12-Aug-08 5:43
TheComputerMan12-Aug-08 5:43 
GeneralRe: Accessing Variables in a c# windows application Pin
Rome'12-Aug-08 6:00
Rome'12-Aug-08 6:00 
GeneralRe: Accessing Variables in a c# windows application Pin
vikas amin12-Aug-08 5:50
vikas amin12-Aug-08 5:50 
QuestionStrange problem with GetSchemaTable and utf8 Pin
stofel12-Aug-08 4:24
stofel12-Aug-08 4:24 
AnswerRe: Strange problem with GetSchemaTable and utf8 Pin
Wendelius12-Aug-08 7:57
mentorWendelius12-Aug-08 7:57 
QuestionEvent for handling exception during Application Close in winforms Pin
Rashmi_Karnam12-Aug-08 4:14
Rashmi_Karnam12-Aug-08 4:14 
AnswerRe: Event for handling exception during Application Close in winforms Pin
Manas Bhardwaj12-Aug-08 4:24
professionalManas Bhardwaj12-Aug-08 4:24 

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.