your code snippet is for java not JavaSript replace __javaScript with
__BeanShell (and it should be java.text.SimpleDateFormat)
If you want to use javaScript you will have to create a date object and
invoke methods on it (to get years,day,month , hours etc) and concatenate
the result in the format you want

regards
deepak

On Tue, Oct 26, 2010 at 7:57 AM, satish <
[email protected]> wrote:

>
>
> Hi,
> I'm trying to add the DateTIme stamp to on of my queries in the following
> format: yyyy-MM-dd HH:mm:ss.
> I am using the following Javascript function to do this.
> ${__javaScript(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new
> java.util.Date()))}
> Does not seem to work. I get an empty string. Any ideas on how to correct
> this?
>
> Thanks,
> Satish
> --
> View this message in context:
> http://jmeter.512774.n5.nabble.com/DateTime-stamp-in-ISO-format-tp3237193p3237193.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to