I have been using a format function based on msstdfmt.dll for many years to help format dates within a VBScript both on clients and servers. (see below).
It appears that msstdfmt.dll is no longer installed as standard on 64 bit operating systems.
Searching the web the advice seems to be to download a copy and register it on the machine running the VBScript.
Is this a sensible thing to do, or will it cause problems?
More importantly, is there a different way of achieving this code. It doesn't seem right to issue VBScript that can't run on a native operating system without downloading old components.
Hope you can help
Function Format(vExpression, sFormat)
set fmt = CreateObject("MSSTDFMT.StdDataFormat")
fmt.Format = sFormat
Set rs = CreateObject("ADODB.Recordset")
rs.Fields.Append "fldExpression", 12
Set rs("fldExpression").DataFormat = fmt
rs("fldExpression").Value = vExpression
Format = rs("fldExpression").Value
rs.close: Set rs = Nothing: Set fmt = Nothing