I am new to VBScript and can't figure out why I'm getting an Object Required
error with my code. It's very simple right now, I've just begun it:
<%
set fs=Server.CreateObject("Scripting.FileSystemObject")
Dim dateandtime
On Error Resume Next
set dateandtime = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss")
If Err <> 0 Then
' File operation(s) failed, handle the error
response.write(Err.Description)
End If
%>
Why am I not able to set the DateTime? I've set the FileSystemObject for use later in the code FYI. I'm just putting it all in here so you see exactly what I have. I figure it's a simple syntax thing but I can't seem to find the answer anywhere. Thanks for your help!