Is there any function to get current date?

I have a date field and it displays the current date.

so is there any way to get the current date and compare with the value from the text box.

Thanks

That will depend on the format of the date from the text box. You will likely need to use Java’s SimpleDateFormat class to achieve what you want, but without any examples, I cannot provide any details.

or look into groovy docs, search about date/time

	TimeZone.setDefault(TimeZone.getTimeZone('Europe/Warsaw'))
	Date today = new Date()
	String todaysDate = today.format('yyyy-MM-dd')
1 Like

Thanks Gontar and it worked as expected.