c# - how can i view the month date year only? i'm using datetime, data type -


public static void addemployee(string eid, string fname, string lname, int salary, datetime birthday)    buz.addemployee(textbox1.text, textbox2.text, textbox3.text, int.parse(textbox4.text), datetime.parse(textbox6.text)); 

by code, can generate month date year.

protected void calendar1_selectionchanged(object sender, eventargs e)          {              textbox6.text = calendar1.selecteddate.toshortdatestring();              calendar1.visible = true;          } 

but when view it still includes time. how can view month date year only?

you can this:

int year = calendar1.selecteddate.year; int month = calendar1.selecteddate.month; 

Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -