|
-
Jun 9th, 2001, 11:46 AM
#1
Thread Starter
New Member
Difference between NT and 98 when running DateDiff
Is there difference between running a VBS script in windows NT and 98. Because When i run the code below in Windows 98, i get the correct result but when i run it in windows NT i get the wrong answer. My consern is specifically with the DateDiff function which supposed to give u the difference in days with "d" option. So please let me know about this little problem
'#$language = "VBScript"
'#$interface = "1.0"
Sub main
Dim Sys_Joined_Date,AP_Joined_Date
Dim AP_Year,AP_Month,AP_Day,AP_Hour,AP_Min,Sys_Year,Sys_Month,Sys_Day,RAP_Time
Dim DayDiff,Sys_Hour,Sys_Minute,WFR
AP_Month = "06"
AP_Day = "07"
Sys_Year = "01"
AP_Year= Sys_Year
Sys_Month = "06"
Sys_Day = "06"
AP_Joined_Date=AP_Month&"/"&AP_Day&"/"&AP_Year
Sys_Joined_Date=Sys_Month&"/"&Sys_Day&"/"&Sys_Year
DayDiff = DateDiff("d",Sys_Joined_Date,AP_Joined_Date)
MsgBox "Day differ = " & DayDiff &vbcrlf & "Sys_Joined = "&Sys_Joined_Date& vbcrlf &"AP_Joined = "&AP_Joined_Date
end sub
main
-
Jun 9th, 2001, 01:03 PM
#2
Frenzied Member
No. They should yield the same results. Perhaps the regional settings on the server are different than on the 98 machine. Not 100% sure if that would make a difference but it may.
oOOo--oOOo
__ /\/\onte96
oOOo--oOOo
Senior Programmer/Analyst
MCP
[email protected]
[email protected]
Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..
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
|