The toString() function of date object return date as string. Use it for example to date as string.
Syntax
This will produce following result