# Assign timestamp value to field in filebeat

**URL:** https://discuss.elastic.co/t/assign-timestamp-value-to-field-in-filebeat/295734
**Category:** Beats
**Tags:** filebeat
**Created:** [January 29, 2022, 12:08am UTC](https://discuss.elastic.co/t/assign-timestamp-value-to-field-in-filebeat/295734 "2022-01-29T00:08:11Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jpfreyen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpfreyen/32/92597_2.png) [@jpfreyen](https://discuss.elastic.co/u/jpfreyen)
#### Post date: [January 29, 2022, 12:08am UTC](https://discuss.elastic.co/t/assign-timestamp-value-to-field-in-filebeat/295734/1 "2022-01-29T00:08:11Z")

</div>

Hello,

Is there a way for me to assign the timestamp value to an add\_field? Like for example:

```auto
processors:
- add_fields:
    fields:
      collectiontime: "@timestamp"

```

This example doesn't work because when I check the debug log I see a:

"collectiontime":"@timestamp"

and I really want:

"collectiontime":2022-01-29T05:36:14.656+0530"

ie, the actual time.

or maybe there is a way to call a Linux command, like:

collectiontime: %{date}

where 'date' is the Linux command (I am sure I have the format wrong)

Thanks!

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [February 26, 2022, 2:08am UTC](https://discuss.elastic.co/t/assign-timestamp-value-to-field-in-filebeat/295734/2 "2022-02-26T02:08:24Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
