Classic ASP
Classic ASP
Transition from Cert.GetValidToDt to Cert.ValidToStr
Provides instructions for replacing deprecated GetValidToDt method calls with ValidToStr.Chilkat Classic ASP Downloads
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
set cert = Server.CreateObject("Chilkat.Cert")
' ------------------------------------------------------------------------
' The GetValidToDt method is deprecated:
' ckdt1 is a Chilkat.CkDateTime
Set ckdt1 = cert.GetValidToDt()
If (cert.LastMethodSuccess = 0) Then
Response.Write "<pre>" & Server.HTMLEncode( cert.LastErrorText) & "</pre>"
Response.End
End If
' ...
' ...
' ------------------------------------------------------------------------
' Do the equivalent using the ValidToStr property
set ckdt2 = Server.CreateObject("Chilkat.CkDateTime")
success = ckdt2.SetFromRfc822(cert.ValidToStr)
%>
</body>
</html>