# ML job for calendar date other than @timestamp

**URL:** <https://discuss.elastic.co/t/ml-job-for-calendar-date-other-than-timestamp/130163>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-machine-learning\
**Created:** [May 1, 2018, 9:01pm UTC](https://discuss.elastic.co/t/ml-job-for-calendar-date-other-than-timestamp/130163 "2018-05-01T21:01:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![georgezoto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/georgezoto/32/18855_2.png) [@georgezoto](https://discuss.elastic.co/u/georgezoto)\
**Post date:** [May 1, 2018, 9:01pm UTC](https://discuss.elastic.co/t/ml-job-for-calendar-date-other-than-timestamp/130163/1 "2018-05-01T21:01:50Z")

</div>

Hello Machine Learning team,

I went to all kinds of hoops ➰ to finally have x-pack and ML on the cloud (elastic cloud does not offer ML feature yet 😥) on a 3 node EC2 cluster.

I have a simple dataset where `@timestamp` (used simply to reference dataset ingestion time) is the default time field I picked in the index pattern. However I have another date field (`Claim Date` in the screenshot) that I would like to use as my time axis for forecasting several metrics I have.

 ![Data%20Types](https://us1.discourse-cdn.com/elastic/original/3X/2/a/2afe3d823d91b9c56f1964cf843aef7936f11f59.jpg)

Can someone please tell me that this is possible and how to do it?  
Does ML module only work with the @timestamp field ☹ ?  
What if my dataset has several datetime fields I want to create a ML job over and use as the x/time-axis?

Thank you in advance,  
George Zoto

---

<div class="post-metadata">

**Author:** ![richcollier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richcollier/32/115035_2.png) [@richcollier](https://discuss.elastic.co/u/richcollier)\
**Post date:** [May 1, 2018, 9:34pm UTC](https://discuss.elastic.co/t/ml-job-for-calendar-date-other-than-timestamp/130163/2 "2018-05-01T21:34:32Z")

</div>

Hi George,

It's not that ML requires the date field to be `@timestamp` - rather, most of the config UIs to create the jobs will use whatever field is designated to be the time the events occurred, denoted by the clock icon:

![image](https://us1.discourse-cdn.com/elastic/original/3X/2/3/23f139e391583c57c487b738399ef06317df7b5a.png)

If you want to analyze data using a different field than this field, then you have two options.

1. Use the Advanced Job wizard, and make sure you select the Time-field name in the Datafeed tab:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/e/0/e04b155c47621c9efcec25c0be9d5e22cc58ae87.png)

1. Use the API to configure the job, making sure you set the `time_field` to the name of the field you'd like ML to use as the x/time-axis

See: [https://www.elastic.co/guide/en/elasticsearch/reference/6.2/ml-job-resource.html#ml-datadescription](https://www.elastic.co/guide/en/elasticsearch/reference/6.2/ml-job-resource.html#ml-datadescription)

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 30, 2018, 10:21pm UTC](https://discuss.elastic.co/t/ml-job-for-calendar-date-other-than-timestamp/130163/3 "2018-10-30T22:21:33Z")

</div>


