# Parsing date strings

Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fdataprime%2Fcookbook%2Fparsing_timestamps.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fdataprime%2Fcookbook%2Fparsing_timestamps.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

## Problem / Use case[​](#problem--use-case "Direct link to Problem / Use case")

You have ISO 8601 formatted timestamps (or similar) as strings (e.g., from log fields or external inputs), and you want to convert them into a readable datetime format for dashboards or further processing. Use [parseTimestamp](https://coralogix.com/docs/docs/dataprime/language-reference/functions-reference/time/parsetimestamp/.md) and [formatTimestamp](https://coralogix.com/docs/docs/dataprime/language-reference/functions-reference/time/formattimestamp/.md) to make the conversion possible.

## Query[​](#query "Direct link to Query")

```
create parsed from parseTimestamp('2025-04-29T05:53:02.439Z', 'iso8601')

| create formatted_time from formatTimestamp(parsed, '%Y-%m-%d %H:%M:%S')
```

## Output[​](#output "Direct link to Output")

```
{

  "parsed": 2025-04-29T05:53:02.439Z,

  "formatted_time": "2025-04-29 05:53:02"

}
```

## Variations[​](#variations "Direct link to Variations")

* Format as date only: `'%Y-%m-%d'`
* Include timezone offset: `formatTimestamp(parsed, '%Y-%m-%d %H:%M:%S', 'UTC')`
* Format as timestamp in milliseconds: `'timestamp_milli'`

## TL;DR[​](#tldr "Direct link to TL;DR")

Use `parseTimestamp` to interpret strings as timestamps, then `formatTimestamp` to convert them into readable strings. Works great for standardizing date fields across logs.
