# Manipulate Timestamp

**URL:** <https://forum.inductiveautomation.com/t/manipulate-timestamp/70418>\
**Category:** Ignition\
**Created:** [February 28, 2023, 12:50pm UTC](https://forum.inductiveautomation.com/t/manipulate-timestamp/70418 "2023-02-28T12:50:14Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [March 1, 2023, 2:38pm UTC](https://forum.inductiveautomation.com/t/manipulate-timestamp/70418/22 "2023-03-01T14:38:02Z")

</div>

I don't know mssql, so I can't say for sure, and I don't understand why the query has every field aliased?  
I also don't know what the brackets around timestamp mean, I assume it would be as simple as this.

```sql
select Cold, Hot, Total, DATEADD(day, -1, TimeStamp) as TimeStamp
from Flows_DataTotals
order by TimeStamp desc

```

---

<div class="post-metadata">

**Author:** ![kaleb.s](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@kaleb.s](https://forum.inductiveautomation.com/u/kaleb.s)\
**Post date:** [March 1, 2023, 2:39pm UTC](https://forum.inductiveautomation.com/t/manipulate-timestamp/70418/23 "2023-03-01T14:39:17Z")

</div>

Im not sure why there is brackets around the TimeStamp, I just used the builder and selected the fields I needed for my reporting. Will give that a shot. Appreciate all your help.

---

<div class="post-metadata">

**Author:** ![kaleb.s](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@kaleb.s](https://forum.inductiveautomation.com/u/kaleb.s)\
**Post date:** [March 1, 2023, 2:54pm UTC](https://forum.inductiveautomation.com/t/manipulate-timestamp/70418/24 "2023-03-01T14:54:27Z")

</div>

Got it sorted out! Thank you so much.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 1, 2023, 3:11pm UTC](https://forum.inductiveautomation.com/t/manipulate-timestamp/70418/25 "2023-03-01T15:11:35Z")

</div>

> [@kaleb.s](#):
>
> brackets around the TimeStamp

Because `timestamp` is a reserved word (data type). To use a reserved word as a column name, it must be quoted. MS SQL Server uses non-standard square brackets for identifier quotes.

It is a tip that you should not use that column name.

[Previous page](https://forum.inductiveautomation.com/t/manipulate-timestamp/70418.md?page=1)
