--- id: timeshift title: timeshift Metrics Operator sidebar_label: timeshift description: Use the timeshift metrics operator to shift time series from your query by a specified period of time. slug: /help/docs/metrics/metrics-operators/timeshift/ canonical: https://www.sumologic.com/help/docs/metrics/metrics-operators/timeshift/ --- import useBaseUrl from '@docusaurus/useBaseUrl'; The `timeshift` operator shifts the time series from your metrics query by a specified period of time. ## Syntax ```sql timeshift TIME_INTERVAL ``` Where: * `TIME_INTERVAL` is a time interval in millisecond(ms), seconds (s), minutes (m), hours (h), or days (d). ## Example Query #A returns the `CPU_Idle` metric for the currently selected query time range, the last 15 minutes. ```sql #A _sourceCategory=prod/host _sourceHost=my-mac= metric=CPU_Idle ``` Query #B returns the `CPU_Idle` metric for the 15 minute period that ended two hours ago. ```sql #B _sourceCategory=prod/host _sourceHost=my-mac= metric=CPU_Idle | timeshift 2h ``` your description