Sample code for 30+ languages & platforms
VBScript

Transition from Cert.GetValidFromDt to Cert.ValidFromStr

Provides instructions for replacing deprecated GetValidFromDt method calls with ValidFromStr.

Chilkat VBScript Downloads

VBScript
Dim fso, outFile
Set fso = CreateObject("Scripting.FileSystemObject")
'Create a Unicode (utf-16) output text file.
Set outFile = fso.CreateTextFile("output.txt", True, True)

set cert = CreateObject("Chilkat.Cert")

' ------------------------------------------------------------------------
' The GetValidFromDt method is deprecated:

' ckdt1 is a Chilkat.CkDateTime
Set ckdt1 = cert.GetValidFromDt()
If (cert.LastMethodSuccess = 0) Then
    outFile.WriteLine(cert.LastErrorText)
    WScript.Quit
End If

' ...
' ...

' ------------------------------------------------------------------------
' Do the equivalent using the ValidFromStr property

set ckdt2 = CreateObject("Chilkat.CkDateTime")
success = ckdt2.SetFromRfc822(cert.ValidFromStr)

outFile.Close