This topic is locked
[SOLVED]

 Can We Use The Date( ) Function ?

3/19/2013 12:54:07 PM
ASPRunnerPro General questions
C
CodeIsPoetry author

I am having trouble using this conde on my page in the custom : strValue.
I am trying to use date´s.

Here goes the code:
var d = new Date();
When I check Syntax i get this error : Microsoft VBScript compilation error: Expected end of statement in line 1
What is the problem with this line? : var d = new Date();

Sergey Kornilov admin 3/19/2013

You need to use VBScript syntax in ASP code. My guess is that you use JScript code sample here (semicolon at the end suggests it).

C
CodeIsPoetry author 3/19/2013



You need to use VBScript syntax in ASP code. My guess is that you use JScript code sample here (semicolon at the end suggests it).


Ups my error trying using JavaScript in that field...

Looks like i have to use VBScript ... maybe with this function DateValue() http://www.w3schools.com/vbscript/vbscript_ref_functions.asp
Thank you for your time <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=70235&image=1&table=forumreplies' class='bbc_emoticon' alt=';)' />
Best Regards