Skip to main content

Current date and time

  • What is it? This formula returns the current date and time. The date will be in a format based on the LOCALE constant, assuming the PHP Internationalisation extension is installed. If this is not installed, the format will be UK, e.g. dd/mm/yyyy. Time will always be in the format hh:mm:ss.

Inputs​

This formula requires no inputs.

Return values​

The current date and time. Dates will either be in the format specified by the LOCALE constant, or the default UK format. Time will always be in the format hh:mm:ss.

Formula Logic​

  1. This formula obtains a new DateTime object, representing the current date and time.

  2. The DateTime object is output in either the format specified by the LOCALE constant, or the default UK format.