---
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: parseFormattedDateString (dateString, dateFormat)
layout: subsection
---

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

Returns a Date object for the given date string with the given date format.

The default time and timezone is midnight Coordinated Universal Time (UTC). If you use the `parseFormattedDateString` function for comparison or calculation purposes, include the time zone. This example uses midnight Pacific Daylight Time (PDT):

```
date:parseFormattedDateString('2020-07-01 PDT', 'yyyy-MM-dd z')
```

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

`Date`

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

```
date:parseFormattedDateString(dateString, dateFormat)
```

<table><thead><tr><th>Parameter</th><th>Description</th></tr></thead><tbody><tr><td>dateString</td><td>A date string whose format is <code>dateFormat</code>.</td></tr><tr><td>dateFormat</td><td>A date format string. For valid date formats, see the Java documentation for <code>java.text.SimpleDateFormat</code>.</td></tr></tbody></table><br/>

<b>Example</b>

`date:parseFormattedDateString('10/31/2016','MM/dd/yyyy')`

Returns a Date Object with year = 2016, month = October, day = 31.

