Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

bimartingo
New Contributor

MakeDate as a number

Hi, need some help on date / Makedate

If i read a excel file with a "date" column (number formated as a date) into a variable, this variable get's the number representing the date.

If i create a variable with makedate(yyyy,mm,dd) i get dd/mm/yyyy ( my date mask is DateFormat='DD/MM/YYYY' )

how do i do to create this variable as a number, like i had got reading from the excel file?

I believe this question of variables and the use of them in code and set expresssions is very confusing.

1 Solution

Accepted Solutions
MVP
MVP

MakeDate as a number

If you want to convert your date to a number, use

Let vDate = num(makedate(yyyy,mm,dd));

in your variable definition. (Or num('$(vDate)') in any expression using your original variable should work, too.)

Or use date() function to format your excel date field:

...

Date(EXCELFIELD) as Date,

...

Hope this helps,

Stefan

2 Replies
MVP
MVP

MakeDate as a number

If you want to convert your date to a number, use

Let vDate = num(makedate(yyyy,mm,dd));

in your variable definition. (Or num('$(vDate)') in any expression using your original variable should work, too.)

Or use date() function to format your excel date field:

...

Date(EXCELFIELD) as Date,

...

Hope this helps,

Stefan

MVP
MVP

MakeDate as a number

Hi,

Use Num() to convert date to number format.

Regards,

Jagan.

Community Browser