# Deformat date and time maually

**URL:** <https://clarionhub.com/t/deformat-date-and-time-maually/6835>\
**Category:** questions\
**Tags:** language\
**Created:** [December 7, 2023, 10:37pm UTC](https://clarionhub.com/t/deformat-date-and-time-maually/6835 "2023-12-07T22:37:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sk2107](https://clarionhub.com/user_avatar/clarionhub.com/sk2107/32/3135_2.png) [@sk2107](https://clarionhub.com/u/sk2107)\
**Post date:** [December 7, 2023, 10:37pm UTC](https://clarionhub.com/t/deformat-date-and-time-maually/6835/1 "2023-12-07T22:37:24Z")

</div>

Hello,

How can get the numeric of date and time together and reverse it?

For example:

08/12/2023=81429 , 01:26:51=521158

I can use Format and Deformat to get each one separately, but what I want is to get the numeric value for date and time together '08/12/2023 01:26:51' (same as excel and SQL) and reverse it to date/time format.

Thank you

---

<div class="post-metadata">

**Author:** ![seanh](https://clarionhub.com/letter_avatar_proxy/v4/letter/s/4af34b/32.png) [@seanh](https://clarionhub.com/u/seanh)\
**Post date:** [December 7, 2023, 11:09pm UTC](https://clarionhub.com/t/deformat-date-and-time-maually/6835/2 "2023-12-07T23:09:31Z")

</div>

Use capesoft StringTheory it has a couple of classes dealing with date and times to do just that

---

<div class="post-metadata">

**Author:** ![Bruce](https://clarionhub.com/letter_avatar_proxy/v4/letter/b/ccd318/32.png) [@Bruce](https://clarionhub.com/u/Bruce)\
**Post date:** [December 8, 2023, 3:34am UTC](https://clarionhub.com/t/deformat-date-and-time-maually/6835/3 "2023-12-08T03:34:40Z")

</div>

Yeah, so StringTheory has a pair of classes called StringFormat and StringDeformat. It slso supports Extended Pictures - basically just more picture formats than the base Clarion Set.

The timestamp format you are refering to is known as the Unix Epoch. This is either the number of seconds, or milliseconds, since Jan 1, 1970. I recommend using a REAL value for this number.

If you want to convert Unix Epoch time to a Clarion Date and Clarion Time (or vice versa) then StringTheory also has a class to do that. So storing the data as a single REAL value, or twin LONG values, is easy.

---

<div class="post-metadata">

**Author:** ![sk2107](https://clarionhub.com/user_avatar/clarionhub.com/sk2107/32/3135_2.png) [@sk2107](https://clarionhub.com/u/sk2107)\
**Post date:** [December 8, 2023, 4:35am UTC](https://clarionhub.com/t/deformat-date-and-time-maually/6835/4 "2023-12-08T04:35:11Z")

</div>

Thank you for your replies.  
Actually I have Capesoft StringTheory version 1.91 with clarion 6.3, and unfortunately these functions are there.

Regards

---

<div class="post-metadata">

**Author:** ![Marius\_Nel](https://clarionhub.com/user_avatar/clarionhub.com/marius_nel/32/2309_2.png) [@Marius\_Nel](https://clarionhub.com/u/Marius_Nel)\
**Post date:** [December 8, 2023, 5:41am UTC](https://clarionhub.com/t/deformat-date-and-time-maually/6835/5 "2023-12-08T05:41:03Z")

</div>

MyDate = 81429  
MyTime = 521158

DateFormatString = ‘\<39\>’& FORMAT(DAY(MyDate ),‘@n02’) &‘/’ & FORMAT(MONTH(MyDate ),‘@n02’) &‘/’ & FORMAT(YEAR(MyDate ),‘@n04’) &’ ‘& FORMAT(MyTime,’@T04’) & ‘\<39\>’

---

<div class="post-metadata">

**Author:** ![sk2107](https://clarionhub.com/user_avatar/clarionhub.com/sk2107/32/3135_2.png) [@sk2107](https://clarionhub.com/u/sk2107)\
**Post date:** [December 8, 2023, 9:39pm UTC](https://clarionhub.com/t/deformat-date-and-time-maually/6835/6 "2023-12-08T21:39:41Z")

</div>

> [@Marius\_Nel](#):
>
> DateFormatString = ‘\<39\>’& FORMAT(DAY(MyDate ),‘@n02’) &‘/’ & FORMAT(MONTH(MyDate ),‘@n02’) &‘/’ & FORMAT(YEAR(MyDate ),‘@n04’) &’ ‘& FORMAT(MyTime,’@T04’) & ‘\<39\>’

Thank you for your contribution, also I think

> ‘\<39\>’& FORMAT(MyDate ,‘@d06’) &’ ‘& FORMAT(MyTime,’@T04’) & ‘\<39\>’  
> will give the same result.

Regard
