|
-
Jul 30th, 2001, 07:11 AM
#1
Thread Starter
Hyperactive Member
DateDiff problem
In Authorware there is the function "DateToNum" here are the specifications:
number := DateToNum(day; month; year)
DateToNum converts a date (day, month, and year) to a number that corresponds to the number of days since January 1, 1900. This function performs the opposite calculation from the Date function, which converts a number to a date. The following table shows the range of valid dates:
Windows: 1, 1, 1970, to June, 2, 2036 (25568 to 49709)
Macintosh: 1, 1, 1904, to June, 2, 2040 (1461 to 51171)
I tried to code it in vb (asp actually) but it is not the same :
function DateToNum(dtDate)
dim strStartDate, dtStartDate
strStartDate = "January 1, 1900"
dtStartDate = DateValue(strStartDate)
DateToNum = DateDiff("d",dtStartDate,dtDate)
end function
1/1/1970 produces 25568 in authorware but 25567 in my routine.
How can I make the routine work for me ?
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
|