# DateTimeConverterProperty

This processor converts a datetime string into a format that you specify.

For more information about this processor including examples, see datetimeConverter in the CloudWatch Logs User Guide.

- Source: [`aws-logs/lib/transformer.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-logs/lib/transformer.ts#L341)
- Type last changed: v2.207.0 · 24 Jul 2025

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_logs as logs } from 'aws-cdk-lib';
const dateTimeConverterProperty: logs.DateTimeConverterProperty = {
  locale: 'locale',
  matchPatterns: ['matchPatterns'],
  source: 'source',
  target: 'target',

  // the properties below are optional
  sourceTimezone: 'sourceTimezone',
  targetFormat: 'targetFormat',
  targetTimezone: 'targetTimezone',
};
```

## Properties

- `locale`: string (required) — The locale of the source field.

- `matchPatterns`: string[] (required) — A list of patterns to match against the source field.

- `source`: string (required) — The key to apply the date conversion to.

- `sourceTimezone`: string = UTC — The time zone of the source field.

- `target`: string (required) — The JSON field to store the result in.

- `targetFormat`: string = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" — The datetime format to use for the converted data in the target field.

- `targetTimezone`: string = UTC — The time zone of the target field.
