Click here to Skip to main content
14,239,699 members
   

ASP.NET

 
QuestionI am having issues with getting results using dates as parameters Pin
samflex26-Jun-19 3:38
membersamflex26-Jun-19 3:38 
QuestionRe: I am having issues with getting results using dates as parameters Pin
Richard MacCutchan26-Jun-19 6:51
protectorRichard MacCutchan26-Jun-19 6:51 
AnswerRe: I am having issues with getting results using dates as parameters Pin
samflex26-Jun-19 7:12
membersamflex26-Jun-19 7:12 
GeneralRe: I am having issues with getting results using dates as parameters Pin
Richard MacCutchan26-Jun-19 7:27
protectorRichard MacCutchan26-Jun-19 7:27 
GeneralRe: I am having issues with getting results using dates as parameters Pin
samflex26-Jun-19 7:41
membersamflex26-Jun-19 7:41 
GeneralRe: I am having issues with getting results using dates as parameters Pin
Richard Deeming26-Jun-19 8:35
mveRichard Deeming26-Jun-19 8:35 
GeneralRe: I am having issues with getting results using dates as parameters Pin
samflex26-Jun-19 10:40
membersamflex26-Jun-19 10:40 
GeneralRe: I am having issues with getting results using dates as parameters Pin
Richard Deeming27-Jun-19 2:14
mveRichard Deeming27-Jun-19 2:14 
I suspect the problem is with the start date, which only has a two-digit year. DateTime.TryParse doesn't know which part is the year, the month, and the day, so it has to guess based on your computer's regional settings.

On my computer, parsing 14-05-05 10:34:03 returns 2005-05-14 10:34:03, which is obviously not what you wanted.

Try changing your date picker so that it always formats the date with four-digit years. If you can't do that, then you'll need to use DateTime.TryParseExact[^] with a list of possible formats.



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

GeneralRe: I am having issues with getting results using dates as parameters Pin
samflex27-Jun-19 3:27
membersamflex27-Jun-19 3:27 
GeneralRe: I am having issues with getting results using dates as parameters Pin
Richard Deeming27-Jun-19 3:32
mveRichard Deeming27-Jun-19 3:32 
GeneralRe: I am having issues with getting results using dates as parameters Pin
samflex27-Jun-19 4:30
membersamflex27-Jun-19 4:30 
GeneralRe: I am having issues with getting results using dates as parameters Pin
Richard Deeming27-Jun-19 4:33
mveRichard Deeming27-Jun-19 4:33 
GeneralRe: I am having issues with getting results using dates as parameters Pin
Richard Deeming27-Jun-19 4:39
mveRichard Deeming27-Jun-19 4:39 
GeneralRe: I am having issues with getting results using dates as parameters Pin
samflex27-Jun-19 4:54
membersamflex27-Jun-19 4:54 
GeneralRe: I am having issues with getting results using dates as parameters Pin
Richard Deeming27-Jun-19 4:58
mveRichard Deeming27-Jun-19 4:58 
AnswerRe: I am having issues with getting results using dates as parameters Pin
ZurdoDev26-Jun-19 8:23
professionalZurdoDev26-Jun-19 8:23 
Questionopen word file in client side Pin
Member 1447396626-Jun-19 1:34
memberMember 1447396626-Jun-19 1:34 
AnswerRe: open word file in client side Pin
Richard MacCutchan26-Jun-19 1:44
protectorRichard MacCutchan26-Jun-19 1:44 
GeneralRe: open word file in client side Pin
Member 1447396626-Jun-19 17:48
memberMember 1447396626-Jun-19 17:48 
GeneralRe: open word file in client side Pin
Richard MacCutchan26-Jun-19 21:14
protectorRichard MacCutchan26-Jun-19 21:14 
QuestionSafe Storage of Secrets in .NET Pin
Ger Hayden24-Jun-19 21:58
memberGer Hayden24-Jun-19 21:58 
AnswerRe: Safe Storage of Secrets in .NET Pin
Richard Deeming25-Jun-19 1:25
mveRichard Deeming25-Jun-19 1:25 
GeneralRe: Safe Storage of Secrets in .NET Pin
Ger Hayden25-Jun-19 6:55
memberGer Hayden25-Jun-19 6:55 
AnswerRe: Safe Storage of Secrets in .NET Pin
Afzaal Ahmad Zeeshan25-Jun-19 23:46
mveAfzaal Ahmad Zeeshan25-Jun-19 23:46 
GeneralRe: Safe Storage of Secrets in .NET Pin
Ger Hayden26-Jun-19 2:17
memberGer Hayden26-Jun-19 2:17 

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.