# Adding Timestamps in Applications at time of Export

**URL:** https://discourse.processing.org/t/adding-timestamps-in-applications-at-time-of-export/38431
**Category:** Processing
**Created:** [August 20, 2022, 12:34pm UTC](https://discourse.processing.org/t/adding-timestamps-in-applications-at-time-of-export/38431 "2022-08-20T12:34:36Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![pyronox](https://avatars.discourse-cdn.com/v4/letter/p/d9b06d/32.png) [@pyronox](https://discourse.processing.org/u/pyronox)
#### Post date: [August 20, 2022, 12:34pm UTC](https://discourse.processing.org/t/adding-timestamps-in-applications-at-time-of-export/38431/1 "2022-08-20T12:34:36Z")

</div>

Hi all,

I was hoping this might be quite an easy one. but haven’t been able to find an answer.  
When exporting an application in processing4 , does anybody know an easy way to store the time at export into the code without manually having to enter it into the code itself.

Thanks in advance.

Lee

---

<div class="post-metadata">

### Author: ![mnse](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mnse/32/16520_2.png) [@mnse](https://discourse.processing.org/u/mnse)
#### Post date: [August 20, 2022, 1:19pm UTC](https://discourse.processing.org/t/adding-timestamps-in-applications-at-time-of-export/38431/2 "2022-08-20T13:19:11Z")

</div>

Hi @pyronox,

What you can do is to write a build script (.bat or .sh) which replaces a tag (ie. #TIMESTAMP#) in your code and afterwards call processing-java for the export.  
Run `processing-java --help` to see which params needs to be used …

Cheers  
— mnse

---

<div class="post-metadata">

### Author: ![pyronox](https://avatars.discourse-cdn.com/v4/letter/p/d9b06d/32.png) [@pyronox](https://discourse.processing.org/u/pyronox)
#### Post date: [August 22, 2022, 8:52am UTC](https://discourse.processing.org/t/adding-timestamps-in-applications-at-time-of-export/38431/3 "2022-08-22T08:52:56Z")

</div>

Hi @mnse,

Thats a good idea - and I will look into it. Thank you @mnse.

Thanks

---

<div class="post-metadata">

### Author: ![mnse](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mnse/32/16520_2.png) [@mnse](https://discourse.processing.org/u/mnse)
#### Post date: [August 22, 2022, 10:15am UTC](https://discourse.processing.org/t/adding-timestamps-in-applications-at-time-of-export/38431/4 "2022-08-22T10:15:45Z")

</div>

Hi @pyronox,

but better make it with a special file for it, not .pde itself…  
ie:

```auto
|-MyPrj
  |-MyPrj.pde (load version.txt and ie. display it)
  |-data
    |-version.txt (file with version)

```

in the script than…ie (sh):

```auto
#!/bin/bash
date "+%Y-%m-%d %H:%M:%S" > data/version.txt
processing-java ... --export ...

```

Cheers  
— mnse
