How to get date without Datetime time?

Asked

Viewed 1,112 times

1

Within the date variable I have this:

inserir a descrição da imagem aqui

Here is the html code:

<input type="text" class="form-control" readonly disabled value="@Model.Data">

Final result:

inserir a descrição da imagem aqui

What is the simplest way to get date ? (date without time)

1 answer

2


Matheus,

Use the code below to get the date without the time.

@Model.Data.ToString("dd/MM/yyyy")

Hug,

Browser other questions tagged

You are not signed in. Login or sign up in order to post.