NOW

Retrieves the current date and time

Description

The NOW() function provides the current date and time at the moment it is called. This is useful for timestamping records, scheduling events, or calculating time differences.

Syntax

NOW()

There are no variables required for this function; it returns the current date and time.

Example

Table

Transaction
Sale Date

Transaction A

2023-09-10 08:30:00

Transaction B

2023-08-25 15:15:00

Transaction C

2023-09-01 11:45:00

Function

NOW()

Results

NOW (datetime)

2023-09-05 14:20:00

2023-09-05 14:20:00

2023-09-05 14:20:00

Last updated