TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
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
Forums
Monthly Leaders
Forum guidelines
Abdul Amin Khan
1.1k
605
21.5k
DateTime Conversion Error.
Dec 17 2017 3:30 AM
Dear All,
Anyone please tell how to change format of Date to "dd/MM/yyyy hh:mm:ss" from "MM/dd/yyyy hh:mm:ss".
Here is an issue:
//================
var GetLastDBBackupTime = string.Empty;
GetLastDBBackupTime = Convert.ToDateTime("12/15/2017 15:30:25").ToString("dd/MM/yyyy hh:mm:ss");//Showing error Inputed string was not in Correct format.
Output will be : 15/12/2017 15:30:25
if (Convert.ToDateTime(DateTime.Now.ToString("dd/MM/yyyy hh:mm:ss")).TimeOfDay > Convert.ToDateTime(GetLastDBBackupTime).AddHours(1).TimeOfDay)
CreateBackup();
Please help.
its Urgent
Reply
Answers (
7
)
ASP.NET MVC Dynamic Report
Get Date only from datetime