Monday, December 15, 2014

kendo ui datetimepicker to C# converting value

Get value

 entity.ExpiredDate = ParseDate(model.ExpiredDate);  
 private static DateTime ParseDate(string input)  
       return DateTime.ParseExact(input, formats, CultureInfo.InvariantCulture, DateTimeStyles.None);  
  private static string[] formats = new string[]  
     "MM/dd/yyyy HH:mm:ss tt",  
     "MM/dd/yyyy HH:mm:ss",  
     "M/dd/yyyy H:mm:ss tt",  
     "M/dd/yyyy H:mm:ss"  ,  
     "MM/dd/yyyy hh:mm tt"  

Set Value

 viewModel.ExpiredDate = entity.ExpiredDate.ToString("MM/dd/yyyy hh:mm tt", CultureInfo.InvariantCulture);       

vfpoledeb.1 provider is not registered on the local machine

Have u Install VFP Ole DB Provider in your System ? If No then Please Install it from following link.