GETDATE Function - SQL Server to Oracle Migration

In SQL Server the GETDATE function returns the current date and time with milliseconds precision without the time zone for the current database instance.

In Oracle you can use the SYSTIMESTAMP function but it includes time zone.

SQL Server:

  -- Get the current date and time with milliseconds precision
  SELECT GETDATE();
  # 2024-07-28 13:13:11.640

Oracle:

  -- Get the current date and time
  SELECT SYSTIMESTAMP FROM dual;
  # 2024-07-28 13:13:11.640000 +03:00

For more information, see SQL Server to Oracle Migration.