Newer Version Available
date_to_string(DateTime | DateOnly, format)
Converts a date to a string.
This function takes a DateTime, DateOnly, or now() as its first argument. For the allowed formats, see the Date Formats section in Date Formats.
Use date_to_string() to display the close date for your opportunities in the format yyyy-MM-dd.. CloseDate must be a DateTime or DateOnly type.
If CloseDate is a Date type, convert it to a DateOnly type with toDate().