convert_time_period_to_epoch_ms
Convert human-readable time strings like '1 hour ago' or ISO 8601 dates to epoch milliseconds for NRQL queries and timestamp comparisons in NewRelic.
Instructions
Convert human-readable time strings to epoch milliseconds. Supports relative times like '1 hour ago', '30 minutes ago', '7 days ago' and absolute times like ISO 8601 dates. Useful for constructing NRQL time ranges or comparing timestamps. This is a local utility that does not make API calls.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| timeString | Yes | Human-readable time string to convert. Examples: '1 hour ago', '30 minutes ago', '7 days ago', '2024-01-15', '2024-01-15T10:30:00Z' | |
| timezone | No | Timezone for interpreting relative times. Default: UTC. Examples: 'America/Los_Angeles', 'America/New_York', 'Europe/London' | UTC |
| referenceTime | No | Reference timestamp in milliseconds for relative calculations. Defaults to current time. |