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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Query

Hi All,

When i putting the MakeDate (2012,04,01) it is giving me the 1/04/2012 in the output ....but when i am adding 1 with the makedate function like below

MakeDate(2012,04,01)  +1

then it is giving me the output  like 41001

can anybody explain me why is it so...i am confused little bit i.e how it is coming.

Regards

Sarfaraz

1 Solution

Accepted Solutions
tresesco
MVP
MVP

As my last line says it is a standard (as in MS Excel), The first date is 31/12/1899 =1, then every day is one more to integer, like:

31/12/1899-1

1/1/1900-2

2/1/1900-3

.....

Read this: QlikView Date fields for more details.

View solution in original post

8 Replies
PrashantSangle

Hi,

When you added 1, It is converting again your date to num format

Write

Date(MakeDate(2012,04,01)  +1)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
tresesco
MVP
MVP

Date is acutally a number at the backend. When you create a date with makedate() it is a number at the backend and Date in the front-end. If a mathematical operation(here'+')  has to be done, it takes the backend number and operate accordingly.

Date-1/04/2012 is equivalent to 401000

If you add 1 to it, you get rightly 401001

If you want next date, try: =Date(MakeDate(2012,04,01)  +1)    // gives you 2/04/2012

Date starts(here) - 31/12/1899 which is actually numerically equivalent to 1.

Not applicable
Author

Hi,

Date(Makedate(2012,04,01)+1,'DD/MM/YYYY')

ychaitanya
Creator III
Creator III


Yes

Date(MakeDate(2012,04,01)+1) as My_Date Should work....

Regards Chaitanya

Not applicable
Author

Hi Tresesco,

Thanks for your reply!!

I got the point...but one thing i did not understand that is ...how this number 401000 is calculated  for the respective date 1/04/2012....

Regards

Sarfaraz

tresesco
MVP
MVP

As my last line says it is a standard (as in MS Excel), The first date is 31/12/1899 =1, then every day is one more to integer, like:

31/12/1899-1

1/1/1900-2

2/1/1900-3

.....

Read this: QlikView Date fields for more details.

Not applicable
Author


Hi Tresesco,

Thanks for your Help!!!!!!

I understood what you told....

Regards

Sarfaraz

Not applicable
Author

Hi ALL,

Thanks guys for your Valueable Reply's ........I got the Answer....

Regards

Sarfaraz