# Setting Timestamp

**URL:** <https://techcommunity.softwareag.com/t/setting-timestamp/61778>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Mainframes\
**Created:** [December 6, 2006, 3:14pm UTC](https://techcommunity.softwareag.com/t/setting-timestamp/61778 "2006-12-06T15:14:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Faisal\_Khan](https://avatars.discourse-cdn.com/v4/letter/f/958977/32.png) [@Faisal\_Khan](https://techcommunity.softwareag.com/u/Faisal_Khan)\
**Post date:** [December 6, 2006, 3:14pm UTC](https://techcommunity.softwareag.com/t/setting-timestamp/61778/1 "2006-12-06T15:14:42Z")

</div>

I read a file using timestamp, to read from a specific date/time.

* * *

01 #START-TIMESTAMP (T)  
END-DEFINE  
\*  
MOVE E’2006-12-01 00:00:01’ TO #START-TIMESTAMP  
READ FILE BY TIMESTAMP STARTING FROM #START-TIMESTAMP :roll:

* * *

I would like to set up date and time as variables so I don’t have to stow the program each i change the date and time. How do I set this up.

---

<div class="post-metadata">

**Author:** ![Steve\_Robinson](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/steve_robinson/32/107_2.png) [@Steve\_Robinson](https://techcommunity.softwareag.com/u/Steve_Robinson)\
**Post date:** [December 6, 2006, 6:19pm UTC](https://techcommunity.softwareag.com/t/setting-timestamp/61778/2 "2006-12-06T18:19:14Z")

</div>

If I understand your question, you have basically solved it already.

Assume you are putting up a Map and asking a user for a starting date and time.

Read this information into Alpha Variables; COMPRESS (or MOVE, or have them REDEFINED as part of a single larger variable) the two separate variables into a single variable, say #alpha-start-timestamp; then use MOVE EDITED to create #start-timestamp.

steve

---

<div class="post-metadata">

**Author:** ![Wilfried\_B](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/wilfried_b/32/83_2.png) [@Wilfried\_B](https://techcommunity.softwareag.com/u/Wilfried_B)\
**Post date:** [December 6, 2006, 9:24pm UTC](https://techcommunity.softwareag.com/t/setting-timestamp/61778/3 "2006-12-06T21:24:07Z")

</div>

```auto

01 #START-TIMESTAMP (T) 
END-DEFINE 
* 
INPUT #START-TIMESTAMP (EM=YYYY-MM-DD^HH:II:SS) /* use this for example
READ FILE BY TIMESTAMP STARTING FROM #START-TIMESTAMP
```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:40pm UTC](https://techcommunity.softwareag.com/t/setting-timestamp/61778/4 "2021-04-02T14:40:58Z")

</div>

Closed on April 2, 2021, 2:40pm UTC


