---
schema_version: "1"
id: bff7a13be1a8a0610c47a60ac02ef677cdd2402c68edc4f92c09c752ba69297e
title: parseDateTimeUTC()
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/aura-platform/guides/aura/ref-jsapi/ref-jsapi-auralocalizationservice-parsedatetimeutc.md
canonical_url: https://developer.salesforce.com/docs/platform/aura-platform/guide/ref-jsapi-auralocalizationservice-parsedatetimeutc.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: fc808e9dc91b6c4eacac4aa804f1c6ab6ea387a0240928472bd469b7ec19caba
products:
  - Lightning Aura Components Developer Guide
  - Platform Developer Content
---

# parseDateTimeUTC()

Parses a string and returns a JavaScript Date.

## Signature

`parseDateTime(string dateTimeString, string parseFormat, string | boolean locale, boolean strictParsing)`

## Parameters

**_dateTimeString_:** Type: `string`. A datetime string.

**_parseFormat_:** Type: `string`. An optional Java format string used to parse the datetime. The default is from the `$Locale` global value provider.

**_locale_:** Type: `string | boolean`. This parameter is deprecated.

**_strictParsing_:** Type: `string`. Set this optional parameter to `true` to turn off forgiving parsing and use strict validation.

## Returns

**Type: `Date`** Returns a JavaScript `Date` object, or `null` if `dateTimeString` is invalid.

## Sample Code

```javascript
var date = "2015-10-9";
// Returns "Thu Oct 08 2015 17:00:00 GMT-0700 (PDT)"
$A.localizationService.parseDateTimeUTC(date);
```

