<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Unable to convert event.start from fetch bizevents into timestamp using timestampFromUnixNanos in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Unable-to-convert-event-start-from-fetch-bizevents-into/m-p/271223#M1755</link>
    <description>&lt;P&gt;Hi All&lt;/P&gt;
&lt;P&gt;I have this DQL which produces the desired output:&lt;/P&gt;
&lt;P&gt;fetch bizevents&lt;BR /&gt;| filter event.type == "cost.list.spend"&lt;BR /&gt;| lookup [fetch dt.entity.host | fieldsAdd entity.name,osArchitecture,osType],sourceField:dt.entity.host,lookupField:id,prefix:"host."&lt;BR /&gt;| fieldsAdd event.start_timestamp = timestampFromUnixNanos(event.start)&lt;/P&gt;
&lt;P&gt;However I am unable to convert&amp;nbsp;event.start into a timstamp using&amp;nbsp;timestampFromUnixNanos&lt;BR /&gt;&lt;BR /&gt;As per the documentation here:&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/discover-dynatrace/references/semantic-dictionary/model/business-analytics#business-events" target="_blank" rel="noopener"&gt;Business Analytics — Dynatrace Docs&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class=""&gt;
&lt;DIV&gt;
&lt;DIV class=""&gt;event.start&amp;nbsp;&lt;SPAN&gt;string&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;stable&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;The event start timestamp in UTC (given in Grail preferred Linux timestamp nano precision format).&lt;BR /&gt;&lt;BR /&gt;The value in my DQL output for event.start in this case is&amp;nbsp; 1740622469442 so there is a value there (translates as&amp;nbsp;27 February 2025 15:20:45 )&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class=""&gt;&lt;SPAN&gt;Am I using the correct function? Any suggestions appreciated&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class=""&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class=""&gt;&lt;SPAN&gt;Alan&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Thu, 27 Feb 2025 13:46:22 GMT</pubDate>
    <dc:creator>AlanFoley</dc:creator>
    <dc:date>2025-02-27T13:46:22Z</dc:date>
    <item>
      <title>Unable to convert event.start from fetch bizevents into timestamp using timestampFromUnixNanos</title>
      <link>https://community.dynatrace.com/t5/DQL/Unable-to-convert-event-start-from-fetch-bizevents-into/m-p/271223#M1755</link>
      <description>&lt;P&gt;Hi All&lt;/P&gt;
&lt;P&gt;I have this DQL which produces the desired output:&lt;/P&gt;
&lt;P&gt;fetch bizevents&lt;BR /&gt;| filter event.type == "cost.list.spend"&lt;BR /&gt;| lookup [fetch dt.entity.host | fieldsAdd entity.name,osArchitecture,osType],sourceField:dt.entity.host,lookupField:id,prefix:"host."&lt;BR /&gt;| fieldsAdd event.start_timestamp = timestampFromUnixNanos(event.start)&lt;/P&gt;
&lt;P&gt;However I am unable to convert&amp;nbsp;event.start into a timstamp using&amp;nbsp;timestampFromUnixNanos&lt;BR /&gt;&lt;BR /&gt;As per the documentation here:&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/discover-dynatrace/references/semantic-dictionary/model/business-analytics#business-events" target="_blank" rel="noopener"&gt;Business Analytics — Dynatrace Docs&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class=""&gt;
&lt;DIV&gt;
&lt;DIV class=""&gt;event.start&amp;nbsp;&lt;SPAN&gt;string&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;stable&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;The event start timestamp in UTC (given in Grail preferred Linux timestamp nano precision format).&lt;BR /&gt;&lt;BR /&gt;The value in my DQL output for event.start in this case is&amp;nbsp; 1740622469442 so there is a value there (translates as&amp;nbsp;27 February 2025 15:20:45 )&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class=""&gt;&lt;SPAN&gt;Am I using the correct function? Any suggestions appreciated&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class=""&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class=""&gt;&lt;SPAN&gt;Alan&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 27 Feb 2025 13:46:22 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Unable-to-convert-event-start-from-fetch-bizevents-into/m-p/271223#M1755</guid>
      <dc:creator>AlanFoley</dc:creator>
      <dc:date>2025-02-27T13:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to convert event.start from fetch bizevents into timestamp using timestampFromUnixNanos</title>
      <link>https://community.dynatrace.com/t5/DQL/Unable-to-convert-event-start-from-fetch-bizevents-into/m-p/271282#M1760</link>
      <description>&lt;P&gt;It's a string (green)&amp;nbsp;&lt;/P&gt;&lt;P&gt;| fieldsAdd timestampFromUnixMillis(toLong(event.start))&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mark_bley_0-1740696166287.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26730i18D51DC9FEB4AB35/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mark_bley_0-1740696166287.png" alt="mark_bley_0-1740696166287.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2025 22:44:04 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Unable-to-convert-event-start-from-fetch-bizevents-into/m-p/271282#M1760</guid>
      <dc:creator>mark_bley</dc:creator>
      <dc:date>2025-02-27T22:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to convert event.start from fetch bizevents into timestamp using timestampFromUnixNanos</title>
      <link>https://community.dynatrace.com/t5/DQL/Unable-to-convert-event-start-from-fetch-bizevents-into/m-p/271287#M1761</link>
      <description>&lt;P&gt;Thanks Mark&lt;/P&gt;&lt;P&gt;You are correct in both instances - it needs to be converted from a string and i need to use&amp;nbsp;timestampFromUnixMillis instead&lt;/P&gt;&lt;P&gt;Appreciate your time&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Alan&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2025 04:59:45 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Unable-to-convert-event-start-from-fetch-bizevents-into/m-p/271287#M1761</guid>
      <dc:creator>AlanFoley</dc:creator>
      <dc:date>2025-02-28T04:59:45Z</dc:date>
    </item>
  </channel>
</rss>

