hi
refer below thread
http://www.aspforums.net/Threads/783562/Show-date-in-yyyyMMdd-format-in-GridView-in-ASPNet/
I used below code to show date in correct format:
Text='<%#toPersianNumber(Eval("sendDate", "{0:yyyy/MM/dd}"))%>'
now I want use it for:
Lbldate.Text = toPersianNumber(_dr["senddate"].ToString());
How I can do it?
Best regards
Neda
Hi nedash,
C#
Lbldate.Text = toPersianNumber(_dr["senddate"].ToString("yyyyMMdd"));
Replace above code with below
Lbldate.Text = toPersianNumber(Convert.ToDateTime(_dr["senddate"].ToString()).ToString("yyyyMMdd"));
I hope works for you.
© COPYRIGHT 2024 ASPSnippets.com ALL RIGHTS RESERVED.