Georgi Yakov
Georgi Yakov

Reputation: 53

Xamarin.Android show current time

I am new to Xamarin and I am trying to do A ToDoListApp. And I want to add a time stamp when a make a new task. I found something in Java but I'm working with c# and I would like to know what is the equivalent to String currentDateTimeString = DateFormat.getDateTimeInstance().format(new Date());

Upvotes: 2

Views: 7237

Answers (2)

Edward Senthu
Edward Senthu

Reputation: 11

DateTime date = DateTime.Now; // will give the date time for today

Upvotes: 0

Anas Alweish
Anas Alweish

Reputation: 3026

try this:

 String myDate = DateTime.Now.ToString();

Upvotes: 3

Related Questions