---
title: "LOCALTIME"
description: "The LOCALTIME SQL function returns the current time of day in local time at the device where Invantive UniversalSQL runs, in whole seconds."
language: en
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/localtime
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/localtime
updated: 2026-11-05T00:00:00Z
license: https://documentation.invantive.eu/en/
---

## Syntax
```mermaid
%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    Start((START)) --> LOCALTIME[LOCALTIME]:::quoted
    LOCALTIME --> End((END))
```

## Purpose
The `LOCALTIME` SQL function returns the current time of day in local time at the device where Invantive UniversalSQL runs, as a time without a date, in whole seconds. It is written without parentheses, as the SQL standard writes it. Within one SQL statement every occurrence returns the same time, taken from the same moment as described in [[NOW]].

See also [[NOW]] and [[CURRENT_DATE]].

Returns: current time of day as `time`.

## Examples
The following example checks whether the current local time lies before noon; the actual value differs per invocation:
```sql
select case when localtime < time '12:00:00' then 'morning' else 'afternoon' end

-------
morning
```