# how to get starttime in Dynatrace DQL

**URL:** <https://community.dynatrace.com/t/how-to-get-starttime-in-dynatrace-dql/47113>\
**Category:** DQL\
**Tags:** dql\
**Created:** [August 12, 2024, 1:23pm UTC](https://community.dynatrace.com/t/how-to-get-starttime-in-dynatrace-dql/47113 "2024-08-12T13:23:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nikhilchandra](https://avatars.discourse-cdn.com/v4/letter/n/59ef9b/32.png) [@nikhilchandra](https://community.dynatrace.com/u/nikhilchandra)\
**Post date:** [August 12, 2024, 1:23pm UTC](https://community.dynatrace.com/t/how-to-get-starttime-in-dynatrace-dql/47113/1 "2024-08-12T13:23:19Z")

</div>

Hi

I have endtime (timestamp format) and duration (duration format), i need starttime by redcucing the duration from endtime. I tried below but the output was wrong. Both start and end values are same. can someone help.

| fieldsAdd StartTime = EndTime - durationMillis

---

<div class="post-metadata">

**Author:** ![Cameron-Leong](https://avatars.discourse-cdn.com/v4/letter/c/54ee81/32.png) [@Cameron-Leong](https://community.dynatrace.com/u/Cameron-Leong)\
**Post date:** [August 13, 2024, 9:14pm UTC](https://community.dynatrace.com/t/how-to-get-starttime-in-dynatrace-dql/47113/2 "2024-08-13T21:14:42Z")

</div>

Hello,

In DQL you can add/subtract timestamps and durations to get a new timestamp (see screenshot). Can you share the full query you are using?

 ![CameronLeong_0-1723583616478.png](https://global.discourse-cdn.com/dynatrace/original/3X/d/2/d2558fb63727c22a9d0d0ce531bc60472752b705.png)
