ITsVISTA
Information that makes life easier when it comes to installing, managing, and using Windows Vista.
Start About FAQ Blogroll Shop

ITsVISTA KB-Link: KB970644

Error message when you try to use the DateDiff function of VBScript on a Windows Vista or Windows Server 2008-based computer that uses a RTL language: “Microsoft VBScript runtime error”

Consider the following scenario on a Windows Vista or a Windows Server 2008-based computer:

  1. The system locale setting is Hebrew or Arabic that uses right-to-left (RTL) language.
  2. You use the FormatDateTime function of Visual Basic Scripting Edition (VBScript) to obtain an expression string that is formatted as a date or a time.
    Note: In this scenario, the string is RTL formatted and this feature is supported because the VBScript version 5.6.

  3. You pass the string to the DateDiff function to obtain the interval between two dates. One of the two dates (which are the parameters for the DateDiff function) is the expression which is from the FormatDateTime function.

In this scenario, you receive the following error message:

Microsoft VBScript runtime error
Type mismatch

There is a download that resolves this issue. See Hotfixes for details.
64-Bit Download: Contact Microsoft

For more information on this issue, including potential causes, workarounds, and resolutions, see: Microsoft KB Article KB970644.

Get notified of new posts for FREE via RSS or E-mail

Subscribe to ITsVISTA!

Related Posts