# date() function

The date() function returns the current
system date in internal format as an integer number representing the
number of days that have elapsed since December 31, 1967 (day 0 on
the D3 calendar).

## Syntax

```
date()
```

## Description

The parentheses following the
function are required, and must not contain arguments. Without the
parentheses, date is assumed to be a variable.

## Example(s)

This calculates the number of
days elapsed between the value of `invoice.date` and
the current system date.

```
number.days = date() - invoice.date
```
This calculates the number of weeks elapsed between the
value of `invoice.date` and the current system date.

```
weeks.old = (date() - invoice.date) / 7
```

## See also

- [d (date) processing code](https://d3codex.com/processingcodes/d-date-processing-code/)
- [BASIC functions](https://d3codex.com/pickbasic-flashbasic/basic-functions/)

---
Source: https://d3codex.com/pickbasic-flashbasic/date-function/ - part of the D3Codex reference.
