Welcome to WebmasterWorld Guest from 54.198.60.39

Forum Moderators: open

Message Too Old, No Replies

Javascript variable

     
8:51 pm on Mar 13, 2003 (gmt 0)

New User

10+ Year Member

joined:Mar 13, 2003
posts:2
votes: 0


Hello!

I have this var
myVar=new Date(2003,2,12,17,18,12);

alert(myVar)
returns "Wed Mar 12 17:18:12 PST 2003"

Is it possble to get the literal string
"new Date(2003,2,12,17,18,12)"
instead of the formed date?

All the best.

5:39 am on Mar 14, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member txbakers is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Sept 1, 2001
posts:4392
votes: 0


myVar = "new Date(2003,2,12,17,18,12)" ;

Just put your literal in quotes.