|
-
Sep 13th, 2010, 04:18 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] DTPicker.
Hi,
I am using the DTPicker and not concentrating much on the regional settings of the system for the Date format.
I am using the following code right now for the dtpicker..
Code:
DTPToday.Format = dtpCustom
DTPToday.CustomFormat = Format(DTPToday.Value, "dd/mm/yy")
The problem is that the DTPicker does not allow the user to edit and does not show the selected date from the drop down calendar, the dtpicker is disabled...
Can anyone please help me to solve this problem.......
Thanks in advance..
-
Sep 13th, 2010, 05:05 AM
#2
Re: DTPicker.
Hi Ram..
Try this:
Code:
Private Sub Form_Load()
DTPToday.Format = dtpCustom
DTPToday.CustomFormat = "dd/MM/yy"
End Sub
..
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Sep 13th, 2010, 08:21 AM
#3
Re: DTPicker.
If you have MSDN installed then hitting F1 should get you this:
String Fragment Description
d The one- or two-digit day.
dd The two-digit day. Single digit day values are preceded by a zero.
ddd The three-character weekday abbreviation.
dddd The full weekday name.
h The one- or two-digit hour in 12-hour format.
hh The two-digit hour in 12-hour format. Single digit values are preceded by a zero.
H The one- or two-digit hour in 24-hour format.
HH The two-digit hour in 24-hour format. Single digit values are preceded by a zero.
m The one- or two-digit minute.
mm The two-digit minute. Single digit values are preceded by a zero.
M The one- or two-digit month number.
MM The two-digit month number. Single digit values are preceded by a zero.
MMM The three-character month abbreviation.
MMMM The full month name.
s The one- or two- digit seconds.
ss The two-digit seconds. Single digit values are proceeded by a zero.
t The one-letter AM/PM abbreviation (that is, "AM" is displayed as "A").
tt The two-letter AM/PM abbreviation (that is, "AM" is displayed as "AM").
X A callback field. The control still uses the other valid format characters, and queries the owner to fill in the "X" portion. The owner must be ready to respond to events that request information about how to fill in these fields. Multiple 'X' characters can be used in series to signify unique callback fields.
y The one-digit year (that is, 1997 would be displayed as "7").
yy The last two digits of the year (that is, 1997 would be displayed as "97").
yyy The full year (that is, 1997 would be displayed as "1997").
If you don't have installed there is always MSDN on-linre - see link in my signature.
-
Sep 13th, 2010, 10:35 AM
#4
Thread Starter
Hyperactive Member
Re: DTPicker.
 Originally Posted by akhileshbc
Hi Ram..
Try this:
Code:
Private Sub Form_Load()
DTPToday.Format = dtpCustom
DTPToday.CustomFormat = "dd/MM/yy"
End Sub
.. 
Hi akhi.....
But the above code shows a date like 05/00/10
I am trying to show the Current date on Form load in the format " dd/mm/yy "
Please help...
Thank you.....
-
Sep 13th, 2010, 10:39 AM
#5
Re: DTPicker.
Try this:
Code:
Private Sub Form_Load()
DTPicker1.Format = dtpCustom
DTPicker1.CustomFormat = "dd/MM/yy"
DTPicker1.Value = Date
End Sub
...
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Sep 13th, 2010, 10:46 AM
#6
Thread Starter
Hyperactive Member
Re: DTPicker.
I tried it....but a step close now...The dtpicker displays the current Day and Year correctly but the month remains 00....its like 13/00/10...
What could be the problem.....?
Please help....
Thanks.....
-
Sep 13th, 2010, 11:23 AM
#7
Re: DTPicker.
Captialization maybe? Are you sure you are using MM vs. mm?
-
Sep 13th, 2010, 11:29 AM
#8
Re: DTPicker.
 Originally Posted by Ram2Curious
What could be the problem.....?
.....
 Originally Posted by RhinoBull
mm The two-digit minute. Single digit values are preceded by a zero.
MM The two-digit month number. Single digit values are preceded by a zero. 
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Sep 13th, 2010, 12:11 PM
#9
Re: DTPicker.
and really, those settings should be done at design time... rather than run-time.
But that could be just me.
-tg
-
Sep 14th, 2010, 05:25 AM
#10
Thread Starter
Hyperactive Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|