Hi all,
I am calling current date in to my text box as
txtFilecreatdate.Text = DateTime.Now.ToString("yy/MM/dd");
but i would like the user edit this date so that the date should be in the format yymmdd any idea please...
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Marimuthu ArigovindasamyRank #5,893 · 283 reputationPosted Jun 23, 2010, 4:38 PM EDT
dateTimePicker1.Format = DateTimePickerFormat.Custom;
dateTimePicker1.CustomFormat = "yy/MM/dd";
You can set the same in the design mode also. (Using property window)
CrishRank #1,487 · 1.1K reputationPosted Jun 22, 2010, 1:18 AM EDT
use date picker control for your solution otherwise you never find what users has written in your textbox.
Dorababu MekaRank #457 · 5.5K reputationPosted Jun 23, 2010, 4:10 AM EDT
Dorababu MekaRank #457 · 5.5K reputationPosted Jun 24, 2010, 8:30 PM EDT
Marimuthu ArigovindasamyRank #5,893 · 283 reputationPosted Jun 24, 2010, 8:48 PM EDT
Put that code in Form_Load event.
It will display the date format as "10/06/25"
Dorababu MekaRank #457 · 5.5K reputationPosted Jun 24, 2010, 8:55 PM EDT
I have written the following
objbll.FileCreationDate = Convert.ToString(dateTimePicker1.Value);
any wrong in this
Dorababu MekaRank #457 · 5.5K reputationPosted Jun 24, 2010, 9:05 PM EDT
objbll.FileCreationDate = Convert.ToString(dateTimePicker1.Value.ToString("yy/MM/dd"));
Marimuthu ArigovindasamyRank #5,893 · 283 reputationPosted Jun 24, 2010, 9:38 PM EDT
Dorababu MekaRank #457 · 5.5K reputationPosted Jun 24, 2010, 9:41 PM EDT