Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

How num function works for date format.

Hi All,

if we add num function with current date  then it will display some random amount..

Is there anyone to help me regarding the logic implemented in QlikView to calculate the amount.

=num(today())

Thank You In advance.

4 Replies
MVP
MVP

Re: How num function works for date format.

if you use this function today i.e 03-08-2013, you will get an integer say x. then for the same function combination tomorrow (04-08-2013) you will get x+1 and for day after tomorrow x+2 and so on.

Not applicable

Re: How num function works for date format.

Thats the question...

from where it takes values x ...

How it will calculate value of x

Not applicable

Re: How num function works for date format.

QV Stores dates as serial numbers similar to the case of Excel.

I hope the below link helps  you understand better :

http://community.qlik.com/servlet/JiveServlet/previewBody/3102-102-3-4191/DateFields-TechBrief-US_v2...

MVP
MVP

Re: How num function works for date format.

This is 1900 Date system:

  • If year is between 0 (zero) and 1899 (inclusive), Excel adds that value to 1900 to calculate the year. For example, DATE(108,1,2) returns January 2, 2008 (1900+108).
  • If year is between 1900 and 9999 (inclusive), Excel uses that value as the year. For example,DATE(2008,1,2) returns January 2, 2008.
  • If year is less than 0 or is 10000 or greater, Excel returns the #NUM! error value.

Hope this helps