You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Vishnu Nandita Ramisetty <pr...@gmail.com> on 2022/10/13 07:27:01 UTC

Date Format Issue with JMeter5.5 version(Time Stamp dd-MMM-yyyy hh-mm-ss is not working)

Hi Team,
Currently I'm using JMeter 5.5.0 version as part of learning and script
execution.

As per my observation from the Function Helper below, the function is not
working .
Function Name:${__time(dd-MMM-yyyy hh-mm-ss)}.
Expected: 13-OCT-2022 12-52-43
 It should give output as current date with Month name but gives error
message(attached screenshot).
Kindly look into it.

Error Message: Unknown pattern letter: t,

stacktrace:
 java.lang.IllegalArgumentException: Unknown pattern letter: t
    at java.time.format.DateTimeFormatterBuilder.parsePattern(DateTimeFormatterBuilder.java:1672)

[image: image.png]

Thanks,
Lakshmi Prasad

Re: Date Format Issue with JMeter5.5 version(Time Stamp dd-MMM-yyyy hh-mm-ss is not working)

Posted by Felix Schumacher <fe...@internetallee.de>.
You might have stumbled upon https://github.com/apache/jmeter/issues/5694

Felix

Am 13.10.22 um 09:27 schrieb Vishnu Nandita Ramisetty:
> Hi Team,
> Currently I'm using JMeter 5.5.0 version as part of learning and 
> script execution.
>
> As per my observation from the Function Helper below, the function is 
> not working .
> Function Name:${__time(dd-MMM-yyyy hh-mm-ss)}.
> Expected: 13-OCT-2022 12-52-43
>  It should give output as current date with Month name but gives error 
> message(attached screenshot).
> Kindly look into it.
>
> Error Message: Unknownpatternletter:t,
> stacktrace:
> java.lang.IllegalArgumentException:Unknownpatternletter:t
> atjava.time.format.DateTimeFormatterBuilder.parsePattern(DateTimeFormatterBuilder.java:1672)
> image.png
>
> Thanks,
> Lakshmi Prasad

Re: Date Format Issue with JMeter5.5 version(Time Stamp dd-MMM-yyyy hh-mm-ss is not working)

Posted by Vishnu Nandita Ramisetty <pr...@gmail.com>.
Hi  Dmitri ,

Thanks for responding on this issue and providing needful information.
As suggested by you , now it's working.You can close this issue.
It's helped me a lot.

However it's strange that another format is working like mentioned
(attached snapshot)
[image: image.png]

Thanks,
Lakshmi Prasad

On Thu, Oct 13, 2022 at 1:06 PM Dmitri T <gl...@live.com> wrote:

> If you're using the Function Helper Dialog
> <https://jmeter.apache.org/usermanual/functions.html#function_helper> you
> need to provide just time pattern in SimpleDateFormat
> <https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html>terms,
> to wit:
>
> *dd-MMM-yyyy hh-mm-ss*
>
> the whole function to be used in the script:
>
> *${__time(dd-MMM-yyyy hh-mm-ss,)}*
>
> More information on JMeter Functions concept: Apache JMeter Functions -
> An Introduction <https://www.blazemeter.com/blog/jmeter-functions>
> On 10/13/2022 9:27 AM, Vishnu Nandita Ramisetty wrote:
>
> Hi Team,
> Currently I'm using JMeter 5.5.0 version as part of learning and script
> execution.
>
> As per my observation from the Function Helper below, the function is not
> working .
> Function Name:${__time(dd-MMM-yyyy hh-mm-ss)}.
> Expected: 13-OCT-2022 12-52-43
>  It should give output as current date with Month name but gives error
> message(attached screenshot).
> Kindly look into it.
>
> Error Message: Unknown pattern letter: t,
>
> stacktrace: java.lang.IllegalArgumentException: Unknown pattern letter: t    at java.time.format.DateTimeFormatterBuilder.parsePattern(DateTimeFormatterBuilder.java:1672)
>
> [image: image.png]
>
> Thanks,
> Lakshmi Prasad
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org

Re: Date Format Issue with JMeter5.5 version(Time Stamp dd-MMM-yyyy hh-mm-ss is not working)

Posted by Dmitri T <gl...@live.com>.
If you're using theFunction Helper Dialog 
<https://jmeter.apache.org/usermanual/functions.html#function_helper> 
you need to provide just time pattern in SimpleDateFormat 
<https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html>terms, 
to wit:

*dd-MMM-yyyy hh-mm-ss*

the whole function to be used in the script:

*${__time(dd-MMM-yyyy hh-mm-ss,)}*

More information on JMeter Functions concept: Apache JMeter Functions - 
An Introduction <https://www.blazemeter.com/blog/jmeter-functions>

On 10/13/2022 9:27 AM, Vishnu Nandita Ramisetty wrote:
> Hi Team,
> Currently I'm using JMeter 5.5.0 version as part of learning and 
> script execution.
>
> As per my observation from the Function Helper below, the function is 
> not working .
> Function Name:${__time(dd-MMM-yyyy hh-mm-ss)}.
> Expected: 13-OCT-2022 12-52-43
>  It should give output as current date with Month name but gives error 
> message(attached screenshot).
> Kindly look into it.
>
> Error Message: Unknownpatternletter:t,
> stacktrace:
> java.lang.IllegalArgumentException:Unknownpatternletter:t
> atjava.time.format.DateTimeFormatterBuilder.parsePattern(DateTimeFormatterBuilder.java:1672)
> image.png
>
> Thanks,
> Lakshmi Prasad