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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

DATE EXPRESSIONS?

1)  year(date(dated,'DD/MM/YYYY')) < '2008'   ?  WHAT IT MEANS  HERE? 

2)num(date('31/12/2009'));      ?   PLS EXPLAIN ME ABOUT THESE 2 EXPRESSIONS  I AM NEW TO THIS  PLS............................

Labels (1)
7 Replies
sasikanth
Master
Master

HI

date() function converts the date into the specified format

year() function calculates the year of that date and checks weather it is <'2008' or not

and

2) i dont think that it is a meaning ful exp

usally left(), mid(),right() functions used here to derive YEAR,MONTH

SunilChauhan
Champion II
Champion II

its so simple any one can easily understand

year(date(dated,'DD/MM/YYYY')) < '2008'

calculatimg year aftermaking date in DD/MM/YYYY and comparing for less than 2008

second one is making number of given date

Sunil Chauhan
Not applicable
Author

Hi

Date(dated,DD/MM/YYYY)

Give the date in the above date format(DD/MM/YYYY) eg. 24/04/2014.

Year(Date(dated,DD/MM/YYYY)) gives 2014

Year(Date(dated,DD/MM/YYYY)) < 2008 means the year of that date is less than 2008

Expression 2 gives number for that date

Not applicable
Author

HERE WHAT  DATED  GIVES

its_anandrjs
Champion III
Champion III

1. The expression calculates the expression until less than 2008 for the expression year(date(dated,'DD/MM/YYYY')) but meaning less why convert dated to 'DD/MM/YYYY' if you directely convert it in to year another one if it is not in proper date format then use as it is but you can use date# to convert on proper date format.

2. Second expression gives you '-' because num is meaning less here. If you use it with date# like

=Num(date#('31/12/2009','DD/MM/YYYY')) then it will gives you Num value.

Not applicable
Author

hi,

1.Extracting the year  and comparing with 2008

2.just changing the DD/MM/YYYY to number format (XXXXXXXX)

Not applicable
Author

Dated is a dimension like column name