Reputation: 33
convert dd-mm-yyyy
to dd/mm/yyyy
for inserting into oracle using oracle client in asp.net
string oldstr = TextBox1.Text;
string strDate = DateTime.ParseExact(oldstr, "dd-MM-yyyy", null).ToString("dd/MM/yyyy");
TextBox4.Text = strDate;
Upvotes: 2
Views: 5611
Reputation: 6590
for c#
DateTime.ParseExact(input, "dd-MM-yyyy", CultureInfo.InvarientCulture).ToString("dd/MM/yyyy")
Upvotes: 1