Click here to Skip to main content
15,846,006 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Store Rich Text in DATA Base Pin
RedDk26-Nov-22 10:08
RedDk26-Nov-22 10:08 
GeneralRe: Store Rich Text in DATA Base Pin
CARBER26-Nov-22 12:03
CARBER26-Nov-22 12:03 
AnswerRe: Store Rich Text in DATA Base Pin
Sam Hobbs26-Nov-22 13:22
Sam Hobbs26-Nov-22 13:22 
QuestionSuggestion on searching thru jobs and resumes Pin
Michael Clinton21-Oct-22 10:44
Michael Clinton21-Oct-22 10:44 
AnswerRe: Suggestion on searching thru jobs and resumes Pin
Richard MacCutchan21-Oct-22 22:43
mveRichard MacCutchan21-Oct-22 22:43 
AnswerRe: Suggestion on searching thru jobs and resumes Pin
rareprob solutions31-Oct-22 23:54
rareprob solutions31-Oct-22 23:54 
AnswerRe: Suggestion on searching thru jobs and resumes Pin
jsc4226-Nov-22 5:59
professionaljsc4226-Nov-22 5:59 
Question(SOLVED) Error: The string was not recognized as a valid DateTime. There is an unknown word starting at index 0. Pin
samflex19-Oct-22 9:11
samflex19-Oct-22 9:11 
Greetings again dear experts,

Back for more your great assistance.

// check to be sure the date selected is not ouside acceptable boudaries
      DateTime runDate = DateTime.Parse(rsRunDate.Text);


When I run my app, I get the following:

The string was not recognized as a valid DateTime. There is an unknown word starting at index 0. This error points to the line code I posted.

I tried changing the code to the following:

DateTime runDate = DateTime.ParseExact(srRunDate.Text,"dd/MM/yyyy", null);


However, I still get same error.

I tried the following:

DateTime _runDate;
string runDate = "";

_runDate = DateTime.Parse(srRunDate.Text);
runDate = _runDate.ToString("dd/MMM/yyyy");


But then, the following produces an error:

if (runDate.Date > DateTime.Now.Date)...


Now, I get the following error:
The name 'runDate' does not exist in the current context


I ran the code in debug mode, it shows runDate with the following value: {1/1/0001 12:00:00 AM} System.DateTime

I am out of ideas.

Any ideas how to fix this?

modified 20-Oct-22 13:04pm.

AnswerRe: Error: The string was not recognized as a valid DateTime. There is an unknown word starting at index 0. Pin
Dave Kreskowiak19-Oct-22 13:26
mveDave Kreskowiak19-Oct-22 13:26 
GeneralRe: Error: The string was not recognized as a valid DateTime. There is an unknown word starting at index 0. Pin
samflex20-Oct-22 8:03
samflex20-Oct-22 8:03 
AnswerRe: (SOLVED) Error: The string was not recognized as a valid DateTime. There is an unknown word starting at index 0. Pin
Eddy Vluggen20-Oct-22 22:56
professionalEddy Vluggen20-Oct-22 22:56 
QuestionHow to Add Add Microsoft Extensions Hosting Manually in .Net Project Pin
Member 1279932118-Oct-22 9:43
Member 1279932118-Oct-22 9:43 
SuggestionRe: How to Add Add Microsoft Extensions Hosting Manually in .Net Project Pin
Richard Deeming19-Oct-22 1:15
mveRichard Deeming19-Oct-22 1:15 
Question"The entry '*' has already been added." error in WebClient UploadString call Pin
Edwin Hon13-Oct-22 17:15
Edwin Hon13-Oct-22 17:15 
AnswerRe: "The entry '*' has already been added." error in WebClient UploadString call Pin
Richard Deeming14-Oct-22 3:55
mveRichard Deeming14-Oct-22 3:55 
QuestionBlazor, styling dynamic data Pin
Wiep Corbier7-Oct-22 18:39
Wiep Corbier7-Oct-22 18:39 
AnswerRe: Blazor, styling dynamic data Pin
Richard Deeming10-Oct-22 22:47
mveRichard Deeming10-Oct-22 22:47 
GeneralRe: Blazor, styling dynamic data Pin
Wiep Corbier10-Oct-22 23:40
Wiep Corbier10-Oct-22 23:40 
SuggestionSort 2 Sheets and update on another Sheet with ole DB Pin
binumon kb4-Oct-22 12:30
binumon kb4-Oct-22 12:30 
GeneralRe: Sort 2 Sheets and update on another Sheet with ole DB Pin
Richard Deeming4-Oct-22 22:23
mveRichard Deeming4-Oct-22 22:23 
Questionwebforms, modal, updatepanel, repeater and linkbutton and opens another modal Pin
Michael Clinton28-Sep-22 16:48
Michael Clinton28-Sep-22 16:48 
AnswerRe: webforms, modal, updatepanel, repeater and linkbutton and opens another modal Pin
Richard Deeming28-Sep-22 23:09
mveRichard Deeming28-Sep-22 23:09 
QuestionChart1.Series Pin
ESTHETIQUE TUNISIE21-Sep-22 4:59
ESTHETIQUE TUNISIE21-Sep-22 4:59 
Questiondocument.activeElement.id not working in safari Pin
Member 1576922815-Sep-22 21:39
Member 1576922815-Sep-22 21:39 
GeneralRe: document.activeElement.id not working in safari Pin
Richard MacCutchan15-Sep-22 22:01
mveRichard MacCutchan15-Sep-22 22:01 

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.