[O3 Framework](../API.md) / toDateObjectStrict

# Function: toDateObjectStrict()

> **toDateObjectStrict**(`omrsDateString`): `null` \| `Date`

Defined in: [packages/framework/esm-utils/src/dates/date-util.ts:72](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-utils/src/dates/date-util.ts#L72)

Converts the object to a date object if it is an OpenMRS ISO date time string.
Otherwise returns null.

## Parameters

### omrsDateString

`string`

## Returns

`null` \| `Date`
