Jes Sie

Jes Sie

  • 741
  • 1.2k
  • 281.8k

How to format textbox to date without the time (12:00 AM)

Oct 17 2016 8:19 AM
I have a date data from database which the data type is date. I fetch the data from DB using DataSet and populate it to a textbox control. The resulting date contains "data and time - 10/3/2016 12:00 AM". What I wanted is this result (10/3/2016 - where, 10 is day and 3 is month).
 
 
below is the snippet of my code:
 
lblIncepDate.Text = ds.Tables[0].Rows[0]["IncepDate"].ToString();
lblExpDate.Text = ds.Tables[0].Rows[0]["ExpDate"].ToString();
 
Hope somebody can share a knowledge. 
 

Answers (9)