I’m registering a javascript in aspx.net
Dim script = "<script language = javascript>" & _
"window.setTimeout('ShowTime(true, [?????])', 1000);</script>"
ClientScript.RegisterStartupScript(Me.GetType, "iniciar", script)
I must write a dateTime parameter in string format, but I’m not achieving the goal. I’ve tryed various time formats (Eg. 2011/02/10 17:05:00), without success. Ps: I know… when I try with only the date, its ok. But I need the time too. Thanks.
Javascript lacks a comprehensive string-based format mechanism. Aside from manually piecing the date together using the Date object’s methods like
getMonthandgetFullYear, one would have to create a script to do such formatting, or use one of the myriad existing functions on the internet. Here is an excellent example: http://blog.stevenlevithan.com/archives/date-time-format