i have DTPicket and TextBox.

how to change DTPicker with this value "2006,05,17"?

DTPicker format : "5/17/06" 'shortdate

for example : DTPicker value = "5/10/06"

Text1.Text value should be "2006,05,10

Thanks in advance...

Recommended Answers

All 4 Replies

Is this what you want to do

Change this DTPicker value = "5/10/06" TO DTpicker.Value = "5/10/06
And This
Text1.Text value should be "2006,05,10
Text1.Text = Format(Text1.Text, "yyyy/mm/dd")
or which ever way around you want it
if this is wrong can you give some more information please


You can change the dtpicker's display value by:

DTPicker1.Format = dtpLongDate

However, if you actually have a textbox, AND a DtPicker, and you want them to display the same date in different formats, then you'll need to do some string manipulation.

watkins6878 & Comatos,

thanks for the reply....

this code has no effect Text1.Text = Format(Text1.Text, "yyyy/mm/dd")
it should be Text1.Text = Format(DTPicker1.Value, "yyyy,mm,dd")

thanks and more power...

Yup, you are absolutely right. So, you got it figured out?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.