---
title: "Set DateTimePicker Control to format YYYYMMDD?"  
description: "Set DateTimePicker Control to format YYYYMMDD?"  
author: "Anonymous User"  
published: 2013-11-13  
updated: 2013-11-13  
canonical: https://www.mindstick.com/forum/1719/set-datetimepicker-control-to-format-yyyymmdd  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# Set DateTimePicker Control to format YYYYMMDD?

I’m using the [date time](https://www.mindstick.com/blog/386/retrieve-sql-server-installation-date-time) picker [control](https://www.mindstick.com/blog/197/asp-dot-net-repeater-control) in [simple](https://yourviews.mindstick.com/story/1469/5-simple-ways-to-stay-fit-amp-healthy) [windows](https://www.mindstick.com/articles/311752/how-to-install-and-use-the-google-wifi-software-on-a-windows-or-mac-computer) [form application](https://www.mindstick.com/interview/23108/how-to-create-form-application-using-dot-net) and I want to [format](https://www.mindstick.com/forum/162083/how-to-convert-ost-files-into-pst-format) the date in YYYYMMDD format as it is my need. How to do it?

## Replies

### Reply by Anonymous User

Hi Tanuj,\

You need to get the DateTime value from the [date](https://yourviews.mindstick.com/story/3869/propose-day-2024-exciting-date-ideas-for-you-and-your-partner) time picker then change it to string with the format.

string formateddate = dtpDate.Value.ToString("yyyyMMdd");

Hope this will solve your problem.

\


---

Original Source: https://www.mindstick.com/forum/1719/set-datetimepicker-control-to-format-yyyymmdd

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
