---
title: "How to convert Datetime Format C#?"  
description: "How to convert Datetime Format C#?"  
author: "marcel ethan"  
published: 2014-11-14  
updated: 2014-11-14  
canonical: https://www.mindstick.com/forum/12583/how-to-convert-datetime-format-c-sharp  
category: "asp.net"  
tags: ["c#", "datetime"]  
reading_time: 1 minute  

---

# How to convert Datetime Format C#?

Here is my [date time](https://www.mindstick.com/blog/386/retrieve-sql-server-installation-date-time) [format](https://www.mindstick.com/forum/162083/how-to-convert-ost-files-into-pst-format) displayed

Dr["DATE"] =========> Jun 27 2014 9:06PM

I want it to display like this one =========> 27.06.2014

**Here is my [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii):**

ltrlNotlar.Text = Dr["DATE"].ToString()

How to change first format to the [second](https://answers.mindstick.com/qa/41761/how-did-the-second-industrial-revolution-influence-women-s-roles-in-society) one?

## Replies

### Reply by Takeshi Okada

use DateTime to do the conversion for you

var dt = DateTime.Parse(Dr["[DATE](https://yourviews.mindstick.com/story/3869/propose-day-2024-exciting-date-ideas-for-you-and-your-partner)"].ToString());

ltrlNotlar.Text = dt.ToString("dd.MM.yyyy");


---

Original Source: https://www.mindstick.com/forum/12583/how-to-convert-datetime-format-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
