|
-
Dec 20th, 2001, 04:03 AM
#1
Thread Starter
Junior Member
DateDiff function......
Hi all,
I've tried the dateDiff function but i encountered some problem.
By right it should be:
diff = DateDiff(DateInterval.Day, dfText, startDate, FirstDayOfWeek.Sunday, FirstWeekOfYear.System)
But it prompt mi tat FirstDayOfWeek is ambiguous.
I also tried:
diff = DateDiff(DateInterval.Day, dfText, startDate)
but it prompt mi that no accessible overloaded dateDiff can be called w/o a narrowing conversion.
Does anybody have any idea whats wrong??
-
Dec 24th, 2001, 01:15 PM
#2
Not sure what that param dfText is but the following worked fine:
Code:
Dim myDateDiff As Long
Dim myDate1 As New Date(2001, 12, 25)
Dim myDate2 As New Date(2002, 12, 25)
myDateDiff = DateDiff(DateInterval.Day, myDate1, myDate2)
MessageBox.Show(myDateDiff.ToString)
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
|