Formatting DataBinder.Eval data

后端 未结 10 1094
眼角桃花
眼角桃花 2020-12-08 04:33

How can I format data coming from a DataBinder.Eval statement in an ASPX page?

For example, I want to display the published date of the news items in a particular fo

10条回答
  •  离开以前
    2020-12-08 05:29

    To format the date using the local date format use:

    <%#((DateTime)Eval("ExpDate")).ToString("d")%>
    

    How to Format an Eval Statement to Display a Date using Date Locale

提交回复
热议问题