convert dd-mm-yyyy to YYYY-MM-DDThh:mmTZD format in c# code example Example: c# date to string yyyy-mm-dd var date_string = date.ToString("yyyy-MM-dd");