Forum Discussion
1 Reply
Sort By
- nmrao
Champion Level 1
Have look at below thread to see if that's helpful:https://community.smartbear.com/t5/SoapUI-Pro/get-current-date-and-time-and-put-it-in-the-body-of-a-request/m-p/177839#M40482
Hi,
So I have since i dont know when been able to use System.currentTimeMillis() or Calendar.instance.getTime() directly requests or as part of a json request like below to get a timestamp
{
"date": "${=System.currentTimeMillis()}"
}
We slowly moving away from millisec toward more human readable isodates.
So i tried to use ${=LocalDate.now()} to get a nice date but this does not work.
I can get it to work by doing this ${=import java.time.LocalDate;LocalDate.now()} but feels ugly somehow
Anyway I'm curious to know why Calendar and System works out of the box while LocalDate does not?