---
url: >-
  /statelake/scripting-reference/functions-and-procedures/datetime-functions/istoday.md
---

# IsToday

**IsToday** performs a test comparing the **TDateTime** value specified in **AValue** with the current date, as either **True** if the dates match, or **False** if they do not match.

The value does not include time, which is set to 00:00:00.

Declaration: Function IsToday(const AValue: TDateTime): Boolean;

A example showing the function used along with **FormatDateTime**. In this example, the test will fail and return **False**.

```pascal
procedure ScriptEvent (var Value : variant);
var
  ADate : TDateTime;
begin
  ADate := IncDay(Date, 7);
 If IsToday(ADate) then //Should be false
    LogInfo('The date matches todays date.')
 else
    LogInfo('The date DOES NOT match todays date.');

    LogInfo('The date is '+FormatDateTime('dd/mm/yyyy',ADate));
    LogInfo('Today is '+FormatDateTime('dd/mm/yyyy',Date));
end;
```

For additional information, please see [DateTime (TDateTime)](/statelake/scripting-reference/data-types/datetime-tdatetime).
