title: Getting groovy.lang.MissingPropertyException: No such property: datepart for class: groovy.lang.Binding
body: <p>I am newbie to jenkins pipeline scripting and i am just trying to concatenate date to string getting below No Such Property exception. Dont know where am doing wrong. Could some one please help me to resolve this</p>
  <pre><code>def generateRandomText(){
  
      def temp = &quot;&quot;
      try{
           Date date = new Date()                
           String datePart = date.format(&quot;ddHHmmssSSS&quot;)
           temp = &quot;abcde&quot; + datepart
           echo &quot;printing ... $temp&quot;      
           return temp
      }
      catch(theError){
          echo &quot;Error getting while generating random text: {$theError}&quot;
      }
      return temp
  
  } 
  </code></pre>