---
title: "Display only date and no time"  
description: "Display only date and no time"  
author: "Anonymous User"  
published: 2018-05-30  
updated: 2018-06-08  
canonical: https://www.mindstick.com/forum/34498/display-only-date-and-no-time  
category: ".net"  
tags: ["c#", ".net", "asp.net mvc"]  
reading_time: 1 minute  

---

# Display only date and no time

I want just [date](https://yourviews.mindstick.com/story/3869/propose-day-2024-exciting-date-ideas-for-you-and-your-partner) to be displayed not time in [partial view](https://www.mindstick.com/articles/1132/auto-refresh-partial-view-in-asp-dot-net-mvc)

```
model.ReturnDate = DateTime.Now;
return PartialView("PartialView", model);  
```

\

## Replies

### Reply by Prakash nidhi Verma

Date only not time is display in partial view:

Please use a templates with field access,property access,single-dimension array index only.

```
@Html.EditorFor(model => model.ReturnDate.ToShortDateString()) 
```

or

```
@Html.EditorFor(model => model.ReturnDate.ToString("MM/dd/yyyy")) 
```

partial view:

```
@Html.EditorFor(model => model.ReturnDateForDisplay) 
```

please use this method for partial view in razor as a render action.

```
<div> @Html.Partial("_mindstick") </div>    div> @{Html.RenderPartial("_mindstick");} </div>  
```

i hope, it will be useful for you.

Happy Coding :)

### Reply by Anonymous User

use this syntax in your [partial](https://www.mindstick.com/blog/78/partial-class-in-dot-net) razor [view](https://yourviews.mindstick.com/view/84701/layoffs-in-google-india-2023-view)

```
@Html.Label(Model.ReturnDate.ToShortDateString())
```


---

Original Source: https://www.mindstick.com/forum/34498/display-only-date-and-no-time

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
