Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Highlighted
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?

1 Solution

Accepted Solutions
MVP
MVP

Re: Make an integer a date format

try :

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

8 Replies
MVP
MVP

Re: Make an integer a date format

try :

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

MVP & Luminary
MVP & Luminary

Re: Make an integer a date format

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


talk is cheap, supply exceeds demand
Not applicable

Re: Make an integer a date format

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

MVP
MVP

Re: Make an integer a date format

try:

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

Not applicable

Re: Make an integer a date format

the result has to be 7.869.187

MVP
MVP

Re: Make an integer a date format

this?

=9000000-Num(today())

Re: Make an integer a date format

You can use get from this

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

Hope it helps

Celambarasan

MVP & Luminary
MVP & Luminary

Re: Make an integer a date format

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

=7910686-num(today())

to get as result: 7869187

- Ralf