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

Pranay RanaRank #735 · 3.2K reputationPosted Dec 17, 2017, 12:04 AM EST
Abdul Amin KhanRank #2,247 · 627 reputationPosted Dec 17, 2017, 12:32 AM EST
Abdul Amin KhanRank #2,247 · 627 reputationPosted Dec 17, 2017, 12:34 AM EST
Shweta LodhaRank #31 · 39.8K reputationPosted Dec 17, 2017, 1:31 AM EST
Amit GuptaRank #190 · 12.8K reputationPosted Dec 17, 2017, 4:05 AM EST
Pranay RanaRank #735 · 3.2K reputationPosted Dec 17, 2017, 5:45 AM EST
Amit GuptaRank #190 · 12.8K reputationPosted Dec 16, 2017, 11:48 PM EST