cancel
Showing results for 
Search instead for 
Did you mean: 

Ready API 3.3.1 - messed date up

SOLVED
Highlighted
Community Hero

Re: Ready API 3.3.1 - messed date up

Right.


Regards,
Rao.
Highlighted
Occasional Contributor

Re: Ready API 3.3.1 - messed date up

@nmrao - Thanks for your time and patience in this date thing.  

 

I also wanted to note, that if anyone is just using the date and doesn't need anything to do with time you can use the following code:

XML:

${java.time.LocalDate.now()}  This will default to the format YYYY-MM-dd

 

Groovy: 

if you use the "Import java.time.*" then you just need LocalDate.now(), otherwise java.time.LocalDate.now() will give the same format as above XML.

 

To use a different format you will need to setup a format variable or put it all together as @nmrao has shown previously.

 

This link helped me play around and get it working:  https://www.java67.com/2016/10/how-to-parse-string-to-localdate-in-Java8-DateTimeFormatter-Example.h...

 

Hope this helps. Good luck!  😉

New Here?
Join us and watch the welcome video:
Announcements
TechCorner Leaderboard
Compete with community members in the TechCorner Challenge and get into the Leaderboard!

Rank Participant Points Earned
1 msiadak 12
2 nmrao 8
3 HimanshuTayal 3
Top Kudoed Authors