# Connx / SQL / simple question: Natural Timestamp / different format =\> YYYYMMDD HH:MM:SS

**URL:** <https://techcommunity.softwareag.com/t/connx-sql-simple-question-natural-timestamp-different-format-yyyymmdd-hhss/266285>\
**Category:** Forum\
**Tags:** Adabas-Natural, Adabas, Mainframe-Integration, CONNX\
**Created:** [November 22, 2022, 9:30am UTC](https://techcommunity.softwareag.com/t/connx-sql-simple-question-natural-timestamp-different-format-yyyymmdd-hhss/266285 "2022-11-22T09:30:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChristianHeld](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/christianheld/32/138_2.png) [@ChristianHeld](https://techcommunity.softwareag.com/u/ChristianHeld)\
**Post date:** [November 22, 2022, 9:30am UTC](https://techcommunity.softwareag.com/t/connx-sql-simple-question-natural-timestamp-different-format-yyyymmdd-hhss/266285/1 "2022-11-22T09:30:47Z")

</div>

Hi everybody

we use ACE version 14.50.21007 to retrieve Mainframe ADABAS Data.

Assume there is a column defined as “natural timestamp”.

When I place a SELECZ like this

SELECT convert(Nat\_Timestamp, char(21)) the result is 2001-12-10 14:17:28.1

in general YYYY-MM-DD HH:MM:SS.T

Question: Is there a trick to get the Nat\_Timestamp in the structure YYYYMMDD HH:MM:SS.T ?

I checked the documentation, but found no elegant solution.

Any help ist welcomed.

Regards Chris

---

<div class="post-metadata">

**Author:** ![anon27083125](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@anon27083125](https://techcommunity.softwareag.com/u/anon27083125)\
**Post date:** [November 22, 2022, 9:51am UTC](https://techcommunity.softwareag.com/t/connx-sql-simple-question-natural-timestamp-different-format-yyyymmdd-hhss/266285/2 "2022-11-22T09:51:49Z")

</div>

Please try this: Replace( convert(Nat\_Timestamp, char(21)) , ‘-’, ‘’)

---

<div class="post-metadata">

**Author:** ![ChristianHeld](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/christianheld/32/138_2.png) [@ChristianHeld](https://techcommunity.softwareag.com/u/ChristianHeld)\
**Post date:** [November 22, 2022, 10:58am UTC](https://techcommunity.softwareag.com/t/connx-sql-simple-question-natural-timestamp-different-format-yyyymmdd-hhss/266285/3 "2022-11-22T10:58:00Z")

</div>

Hi Larry. THX, it works perfect.  
Bye Chrisitan

---

<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:** [May 21, 2023, 10:58am UTC](https://techcommunity.softwareag.com/t/connx-sql-simple-question-natural-timestamp-different-format-yyyymmdd-hhss/266285/4 "2023-05-21T10:58:07Z")

</div>

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