DateTime.Now is giving null value to string variable.

string dateValue = DateTime.Now.ToLocalTime().ToString();

Answers

  • xamarinxxamarinx SAMember ✭✭
    edited October 2017
    string datevalue = System.DateTime.Now.ToString("yyyy/MM/dd", System.Globalization.CultureInfo.InvariantCulture);
    
    Toast.MakeText(this, datevalue, ToastLength.Long).Show();
    
Sign In or Register to comment.