Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Make an integer a date format

Hello,

I am using an Informix database and I only want to select the records of this date.

However, the date field has the following format:

7869187

The date can be calculated as follows: 9.000.000 - 7.869.187 = 1.130.813 = 113-08-13 (format 1YY-MM-DD).

I would have to get rid of the 1 in front of the number, and create a date format.

How can i accomplish this?

Labels (1)
1 Solution

Accepted Solutions
tresB
Champion III
Champion III

try :

Date(Date#(Mid( 9000000-Num(YourDateField),1), YYMMDD), 'YY-MM-DD') as Date

View solution in original post

8 Replies
tresB
Champion III
Champion III

try :

Date(Date#(Mid( 9000000-Num(YourDateField),1), YYMMDD), 'YY-MM-DD') as Date

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try Date(Date#(8000000-YourDateField), YYMMDD), 'YY-MM-DD') as Date


talk is cheap, supply exceeds demand
Not applicable
Author

Thank you. I also need a variable with the date of today in this format. Any ideas?

When I use num(today()) I get 41444

tresB
Champion III
Champion III

try:

Date(today(),'YY-MM-DD')

Not applicable
Author

the result has to be 7.869.187

tresB
Champion III
Champion III

this?

=9000000-Num(today())

CELAMBARASAN
Partner - Champion
Partner - Champion

You can use get from this

=9000000 - Num#(Text(Date(Today(),'1YYMMDD')),'#')

Hope it helps

Celambarasan

rbecher
Partner - Master III
Partner - Master III

If num(today()) = 41499 on 2013-08-13 then use:

=7910686-num(today())

to get as result: 7869187

- Ralf

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine