Showing results for 
Search instead for 
Did you mean: 

about ${=Calendar.instance.getTime()} or ${=System.currentTimeMillis()} but not ${}

Occasional Contributor

about ${=Calendar.instance.getTime()} or ${=System.currentTimeMillis()} but not ${}


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 ${} to get a nice date but this does not work.
I can get it to work by doing this ${=import java.time.LocalDate;} but feels ugly somehow

Anyway I'm curious to know why Calendar and System works out of the box while LocalDate does not?

Community Hero

Re: about ${=Calendar.instance.getTime()} or ${=System.currentTimeMillis()} but not ${

New Here?
Join us and watch the welcome video:
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