---
category: [Administration & Integrations, Platform and Product Extensions, Platform and Product Extensions/Integration, Administration & Integrations/Custom Integrations & Apps, Platform and Product Extensions/Workday Extend]
keyword: [Extend, PMD Scripting, Scripts]
nav: wcp_docs
parent_url: /wcp_docs/
title: timeAfter (date2)
layout: subsection
---

## <a id="section_m3p_myb_5db"></a>Description

Returns true if the time portion of the first date is after the time in the second date. The comparison disregards the date and timezone portions of the 2 dates. You can use the `timeAfter` function on any date object, which can come from a date widget, time widget, or a manually created date object.

For datetime comparison, use the [after (date1, date2)](/wcp_docs/vxt1526016930739.html) function.

## <a id="section_cyq_j1m_zsb"></a>Return Type

`Boolean`

## <a id="section_dz5_pwg_5db"></a>Instance Method Syntax

```
thisDate1.timeAfter(date2)
```

<table><thead><tr><th>Parameter</th><th>Description</th></tr></thead><tbody><tr><td>date2</td><td>A Date object containing the time to compare with the time portion of the input date instance.</td></tr></tbody></table><br/>

<b>Example</b>

```
{
    "type": "date",
    "id": "dateWidget1",
    "datePrecision": "SECOND",
    "dateFormat": "MM/dd/yyyy hh:mm:ss a",
    "value": "03/01/2022 11:30:00 AM"
},
{
    "type": "date",
    "id": "dateWidget2",
    "datePrecision": "SECOND",
    "dateFormat": "MM/dd/yyyy hh:mm:ss a",
    "value": "03/30/2022 08:30:00 AM"
},
{
    "type": "text",
    "id": "result",
    "value": "<% dateWidget1.value.timeAfter(dateWidget2.value) %>"
}
```

The <i>result</i> displays `true`.

## <a id="section_njs_xzl_zsb"></a>Namespace Function Syntax

```
date:timeAfter(date1, date2)
```

<table><thead><tr><th>Parameter</th><th>Description</th></tr></thead><tbody><tr><td>date1</td><td>A Date object containing the time to compare with the date2 time. The Date object is typically the value of a <code>date</code> or <code>time</code> tag.</td></tr><tr><td>date2</td><td>A Date object containing the time to compare with the time portion of date1.</td></tr></tbody></table><br/>

