---
url: /flow/guide/scripting-reference/functions/datetime/dayof.md
---

# DayOf

## Declaration

`Function DayOf( const AValue : TDateTime) : Word`

### Example

```pascal
procedure OnMapEvent(var Value:Variant);
begin
  Value := DayOf(Date); //if date is 2009-06-25 then result is 25
end;
```

## Description

Returns the day of the month represented by the given date value. The resulting day is a number between 1 and 31.
