Current date and time in different formats using Calendar function Calendar c=Calendar.getInstance(); //for current date SimpleDateFormat sdf1=new SimpleDateFormat("dd-MM-yyyy"); String date1 = sdf1.format(c.getTime()); //value of date1 is 27-04-2012 SimpleDateFormat sdf_db=new SimpleDateFormat("yyyy-MM-dd"); String date_db=sdf_db.format(c.getTime()); //value of date_db is 2012-04-27 ...
Wpf examples using vb.net c# - wpf tutorials using c# vb.net - wpf sample code