# DQL Query - how to get the appVersion

**URL:** <https://community.dynatrace.com/t/dql-query-how-to-get-the-appversion/49304>\
**Category:** DQL\
**Tags:** real-user-monitoring-classic, dql, user-sessions\
**Created:** [December 11, 2024, 10:00am UTC](https://community.dynatrace.com/t/dql-query-how-to-get-the-appversion/49304 "2024-12-11T10:00:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sivag1205](https://avatars.discourse-cdn.com/v4/letter/s/d6d6ee/32.png) [@sivag1205](https://community.dynatrace.com/u/sivag1205)\
**Post date:** [December 11, 2024, 10:00am UTC](https://community.dynatrace.com/t/dql-query-how-to-get-the-appversion/49304/1 "2024-12-11T10:00:25Z")

</div>

the appVersion is 3.0.1.1234 ( **a.b.c.d** - format). but, i need to get the appVersion as _ **a.b.c.** _&nbsp;_how to achieve that in here?&nbsp;  
actually i achived that by using this code:_

```markup
data record(appVersion = "3.0.2.1102")
| fieldsAdd versionParts = splitString(appVersion, ".")
| fieldsAdd truncatedVersion = concat(versionParts[0], ".", versionParts[1],".", versionParts[2])

```

_but, i am unable to use this on my actual use case in **userSessionQuery.** &nbsp;_

 ![Screenshot 2024-12-11 at 3.28.39 PM.png](https://global.discourse-cdn.com/dynatrace/original/3X/5/e/5e1746851ae738b8c6e1ba8695c1fe492f9d9063.png)

Help me in this regard

---

<div class="post-metadata">

**Author:** ![Tiit\_Hallas](https://avatars.discourse-cdn.com/v4/letter/t/cdc98d/32.png) [@Tiit\_Hallas](https://community.dynatrace.com/u/Tiit_Hallas)\
**Post date:** [December 15, 2024, 9:18pm UTC](https://community.dynatrace.com/t/dql-query-how-to-get-the-appversion/49304/2 "2024-12-15T21:18:22Z")

</div>

One option would be to use the parse command to **parse** out the version, like this:

```markup
| parse appVersion, "(INT '.' INT '.' INT):truncated_version"

```

Could you show the query where your solution is NOT working?
