Hi,
check this.
using (DBNezamEntities DBNezamEntitie = new DBNezamEntities()) {
PersianCalendar persiancalandar = new PersianCalendar();
var Query = from Newes in DBNezamEntitie.News.AsEnumerable()
select new
{
Newes.Title,
Newes.Summary,
HasbinUpdate = (persiancalandar.GetYear(Newes.UpdateDateTime).ToString() + "/" + persiancalandar.GetMonth(Newes.UpdateDateTime).ToString() + "/" + persiancalandar.GetDayOfMonth(Newes.UpdateDateTime).ToString() + " " + persiancalandar.GetHour(Newes.UpdateDateTime).ToString() + ":" + persiancalandar.GetMinute(Newes.UpdateDateTime).ToString() + ":" + persiancalandar.GetSecond(Newes.UpdateDateTime).ToString() + "" + persiancalandar.GetEra(Newes.UpdateDateTime).ToString()).ToString(),
Groupes = Newes.Genre.Name
};
GridView1.DataSource = Query;
GridView1.DataBind();
}
hope it helps.
Thanks.