|
-
Apr 1st, 2004, 07:18 AM
#1
Thread Starter
Junior Member
date time picker problem
Hi my date time picker control box displays information in this format, with the format property set to short
4/1/04 which is the 1st April 2004 (American Standard)
i wish to change it to the british Standard with the format as being 1/4/04 which be 1st of April 2004 again.
I wish to change the 4/1/04 to 1/4/04
Can anyone plz help ?
Thanks
-
Apr 1st, 2004, 07:45 AM
#2
Fanatic Member
Set ur DTP control's Format property to "Custom"
Then set ur DTP control's CustomFormat property to "d/M/yy"
Regards,
Prakash
-
Apr 2nd, 2004, 01:23 AM
#3
Thread Starter
Junior Member
Thanks dat worked..
But now since ive converted the custom format to british style
my custom format is like this 'dd/MM/yyyy'
ive got 2 date time picker controls
dtpick1
and
dtpick2
i am using the function datediff but it doesnt seem to b picking up the date from the datetimepicker
Dim WYS As Long = DateDiff(DateInterval.WeekOfYear, dtpick1, dtpick2)
do i need to declare two variable as date and then store the date from the datetime picker controls in them n then use them in the datediff function ? i tried that one also but it didnt work
i get error saying
Argument 'Date1' cannot be converted to type 'Date'.
Can anyone help plz ?
regards
-
Apr 2nd, 2004, 01:58 AM
#4
Lively Member
perhaps try the
VB Code:
Dim wys As Long = DateDiff(DateInterval.WeekOfYear, DateTimePicker1.Value, DateTimePicker2.Value)
use the value of your dtps... hope this helps...
-
Apr 2nd, 2004, 03:49 AM
#5
Thread Starter
Junior Member
Thanks dude
this one too worked
THanks
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
|