today()

Constructs a Date from the current date value. Returns a Date instance representing the current date.

Syntax

Date today()

Example

The following expression displays today's date in the format "dd mmm yyyy", for example, "10 Jun 2018":

Date.today().format("DD MMM YYYY")