ieg
asked on
msstdfmt.dll and vbscripts on windows server 2012
Hi
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
Andy
Function Format(vExpression, sFormat)
set fmt = CreateObject("MSSTDFMT.Std DataFormat ")
fmt.Format = sFormat
Set rs = CreateObject("ADODB.Record set")
rs.Fields.Append "fldExpression", 12
rs.Open
rs.AddNew
Set rs("fldExpression").DataFo rmat = fmt
rs("fldExpression").Value = vExpression
Format = rs("fldExpression").Value
rs.close: Set rs = Nothing: Set fmt = Nothing
End Function
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
Andy
Function Format(vExpression, sFormat)
set fmt = CreateObject("MSSTDFMT.Std
fmt.Format = sFormat
Set rs = CreateObject("ADODB.Record
rs.Fields.Append "fldExpression", 12
rs.Open
rs.AddNew
Set rs("fldExpression").DataFo
rs("fldExpression").Value = vExpression
Format = rs("fldExpression").Value
rs.close: Set rs = Nothing: Set fmt = Nothing
End Function
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.