10 TIPs - To Become a Good Developer/Programmer
Why Join
Become a member
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
C# Corner Home
Technologies
Monthly Leaders
ASK A QUESTION
Forum guidelines
Abdul Basith
2.1k
22
6.2k
String was not recognized as a valid DateTime.
Apr 1 2016 2:30 AM
Hi,
I'm taking a date value by using a date picker as a string value
$(
"#Date"
).datepicker({
changeMonth:
true
,
changeYear:
true
,
yearRange:
"-100:+0"
,
dateFormat:
"dd/mm/yy"
});
but i'm getting this (String was not recognized as a valid DateTime.)error while debugging my code at this point
PropDeedDate = Convert.ToDateTime(Exmod[
"Date"
]);
how can i solve this?
I have tried
PropDeedDate = DateTime.ParseExact(Exmod[
"Date"
],
"dd/MM/yyyy"
,
null
);
But the error is still there
Reply
Answers (
3
)
How to create a save or refresh button in c#?
Highcharts label problem with int value