--- title: "system.date.isBefore" description: "Compares two dates to see if date_1 is before date_2." --- # system.date.isBefore > Compares two dates to see if date_1 is before date_2. This function is used in **Python Scripting**. ## Description ## Client Permission Restrictions This scripting function has no [Client Permission](ignition-modules\vision\vision-project-properties\vision-project-properties.md#vision-permissions-properties) restrictions. ## Syntax `system.date.isBefore(date_1, date_2)` ### Parameters Type | Parameter | Description ------- | ------- | ------- Date | `date_1` | The first date. Date | `date_2` | The second date. ### Returns **Boolean** - True if date_1 is before date_2, false otherwise. ### Scope Gateway, Vision Client, Perspective Session ## Code Examples ```python title="Code Snippet" # This will compare if the first date is before the second date, which it is not. first = system.date.getDate(2018, 4, 28) second = system.date.getDate(2018, 3, 22) print system.date.isBefore(first, second) #Will print false. ```