DateTime Convert
DateTime Convert
IN C#--
DateTime fdate = DateTime.Parse(txtFromDate.ToString());
string FromDateD = fdate.ToString("dd-MM-yyyy");
DateTime tdate = DateTime.Parse(txtFromDate.ToString());
string ToDateD = tdate.ToString("dd-MM-yyyy");
//DateTime FromDateD = new DateTime(Convert.ToInt32(txtFromDate.ToString().Split('/')[2]), Convert.ToInt32(txtFromDate.ToString().Split('/')[1]), Convert.ToInt32(txtFromDate.ToString().Split('/')[0]));
//DateTime ToDateD = new DateTime(Convert.ToInt32(txtToDate.ToString().Split('/')[2]), Convert.ToInt32(txtToDate.ToString().Split('/')[1]), Convert.ToInt32(txtToDate.ToString().Split('/')[0]));
IN JQuery--
var parts = mdyDate.split('/');
var dmyDate = parts[1] + '/' + parts[0] + '/' + parts[2];
-----
var FromDate = new Date(parseInt(data.FromDate.substr(6)));
var FinalFromDate = $.datepicker.formatDate('dd/mm/yy', FromDate);
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home