---
title: "How can I work with DateTimePicker control?"  
description: "How can I work with DateTimePicker control?"  
author: "Mark Devid"  
published: 2013-06-15  
updated: 2013-06-15  
canonical: https://www.mindstick.com/forum/1185/how-can-i-work-with-datetimepicker-control  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# How can I work with DateTimePicker control?

Hi Experts,\

How can I work with [DateTimePicker control](https://www.mindstick.com/forum/328/how-get-date-in-c-sharp-datetimepicker-control)?

Thanks in advance.

## Replies

### Reply by Sumit Kesarwani

Hi Mark,\
You can use the following code:\

```
using System;using System.Drawing;using System.Windows.Forms; namespace WindowsFormsApplication1{    public partial class Form1 : Form    {        public Form1()        {            InitializeComponent();        }         private void Form1_Load(object sender, EventArgs e)        {            dateTimePicker1.Format = DateTimePickerFormat.Short;            dateTimePicker1.Value = DateTime.Today;        }         private void button1_Click(object sender, EventArgs e)        {            DateTime iDate;            iDate = dateTimePicker1.Value;            MessageBox.Show("Selected date is " + iDate);        }    }}
```


---

Original Source: https://www.mindstick.com/forum/1185/how-can-i-work-with-datetimepicker-control

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
