Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
bimartingo
Contributor III
Contributor III

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
swuehl
MVP
MVP

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

View solution in original post

2 Replies
swuehl
MVP
MVP

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

jagan
Luminary Alumni
Luminary Alumni

Hi,

Use Num() to convert date to number format.

Regards,

Jagan.