SaiRoja
How do I set Custom Date Format in DateTimePicker (WinForms)
By SaiRoja in Windows Forms on Oct 01 2014
  • SaiRoja
    Oct, 2014 1

    private void Form1_Load(System.Object sender, System.EventArgs e) {DateTimePicker1.Format = DateTimePickerFormat.Custom;DateTimePicker1.CustomFormat = "dd/MM/yyyy";DateTimePicker1.ShowUpDown = false; }

    • 1
  • mahesh babu
    Nov, 2024 7

    private void Form1_Load(object sender, EventArgs e){// Set format to custom date and timedateTimePicker1.Format = DateTimePickerFormat.Custom;dateTimePicker1.CustomFormat = "dd-MM-yyyy hh:mm tt";}

    • 0
  • Rajveer singh
    Apr, 2023 19

    put this code inside InitializeComponent()
    dateTimePicker1.Format = DateTimePickerFormat.Custom;
    dateTimePicker1.CustomFormat = “dd/MM/yyyy”;

    • 0
  • Hezekiah Oluwabukola
    Aug, 2017 16

    tfyuj

    • 0
  • Yadagiri Reddy
    Oct, 2014 17

    set the datepicker control format property set to use a custom format: DateTimePicker1.Format = DateTimePickerFormat.Custom after this by using Customformat you can set your own format. like below DateTimePicker1.CustomFormat = "dd-MM-yyyy"

    • 0
  • Munesh Sharma
    Oct, 2014 7

    public void SetMyCustomFormat() {// Set the Format type and the CustomFormat string.dateTimePicker1.Format = DateTimePickerFormat.Custom;dateTimePicker1.CustomFormat = "MMMM dd, yyyy - dddd"; }

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS