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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Marimuthu ArigovindasamyPosted Jun 23, 2010, 8:38 PM
dateTimePicker1.Format = DateTimePickerFormat.Custom;
dateTimePicker1.CustomFormat = "yy/MM/dd";
You can set the same in the design mode also. (Using property window)
Dorababu MekaPosted Jun 25, 2010, 1:41 AM
Marimuthu ArigovindasamyPosted Jun 25, 2010, 1:38 AM
Dorababu MekaPosted Jun 25, 2010, 1:05 AM
objbll.FileCreationDate = Convert.ToString(dateTimePicker1.Value.ToString("yy/MM/dd"));
Dorababu MekaPosted Jun 25, 2010, 12:55 AM
I have written the following
objbll.FileCreationDate = Convert.ToString(dateTimePicker1.Value);
any wrong in this
Marimuthu ArigovindasamyPosted Jun 25, 2010, 12:48 AM
Put that code in Form_Load event.
It will display the date format as "10/06/25"
Dorababu MekaPosted Jun 25, 2010, 12:30 AM
Dorababu MekaPosted Jun 23, 2010, 8:10 AM
CrishPosted Jun 22, 2010, 5:18 AM
use date picker control for your solution otherwise you never find what users has written in your textbox.