# Comment déclarer une date découpée sur deux champs dans un fichier

**URL:** https://discuss.elastic.co/t/comment-declarer-une-date-decoupee-sur-deux-champs-dans-un-fichier/148989
**Category:** Discussions en français
**Created:** [September 18, 2018, 1:20pm UTC](https://discuss.elastic.co/t/comment-declarer-une-date-decoupee-sur-deux-champs-dans-un-fichier/148989 "2018-09-18T13:20:34Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Mheni](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@Mheni](https://discuss.elastic.co/u/Mheni)
#### Post date: [September 18, 2018, 1:20pm UTC](https://discuss.elastic.co/t/comment-declarer-une-date-decoupee-sur-deux-champs-dans-un-fichier/148989/1 "2018-09-18T13:20:34Z")

</div>

Bonjour  
J'ai un fichier csv, dans lequel la date est découper sur deux champs "date"|"time"  
exemple  
id= 5, Date = 18/09/2018 heure = 10:30:55 dans le fichier est écrit de cette manière

5|20180918|103055

comment je peux les découper et l'entrer comme si une seule date\_time.

Une idée?? Merci

---

<div class="post-metadata">

### Author: ![Julien](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/julien/32/19688_2.png) [@Julien](https://discuss.elastic.co/u/Julien)
#### Post date: [September 18, 2018, 1:23pm UTC](https://discuss.elastic.co/t/comment-declarer-une-date-decoupee-sur-deux-champs-dans-un-fichier/148989/2 "2018-09-18T13:23:54Z")

</div>

La solution pour merger 2 champs contenant date et heure vers un seul champs datetime est ici :

> [@How to merge separate date and time to @timestamp](https://discuss.elastic.co/t/how-to-merge-separate-date-and-time-to-timestamp/132545):
>
> Hi all. I parse a csv with date and time events. These events has no syslogtime. They are separated in to date and time. How can I merge date and time to the @timestamp? I tried some samples with "mutate" and "date" I had found in the forum but without success. Thats my "rubydebug" "StartTime" =\> "18:32:27", "StartDate" =\> "16.05.2018", "@timestamp" =\> 2018-05-19T00:06:28.173Z," Kind regards - Jiona

---

<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: [October 16, 2018, 1:24pm UTC](https://discuss.elastic.co/t/comment-declarer-une-date-decoupee-sur-deux-champs-dans-un-fichier/148989/3 "2018-10-16T13:24:04Z")

</div>

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