Setting Date format in dropdown list

后端 未结 5 1106
孤城傲影
孤城傲影 2021-01-19 11:50

I am retrieving date values from dataset(_dsst) and populating them in dropdown list(drpStartYear).

Since I am storing date as datetime datatype, I am

5条回答
  •  南笙
    南笙 (楼主)
    2021-01-19 12:25

    drpStartYear.DataTextFormatString = "{0:dd-MM-yyyy}";
    drpStartYear.DataTextField = "StartDate";
    

    or you can set this in your mark-up as follows:

    
    

提交回复
热议问题