Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Date:
load * inline
[
DATE
1/1/2011
2/1/2011
3/1/2011
1-Mar-11
5/1/2011
6/1/2011
7/1/2011
8/1/2011
9/1/2011
10/1/2011
11/1/2011
12/1/2011
1/1/2012
2/1/2012
3/1/2012
4/1/2012
5/1/2012
6/1/2012
7/1/2012
8/1/2012
9/1/2012
10/1/2012
11/1/2012
12/1/2012
1/1/2013
2/1/2013
3/1/2013
];
My question is date(DATE) AS date - what is output ? and work of date function here?
year(DATE) =? month(DATE) =? dont share any link just give me answers for this because i have gone through links but i am in confusion ? pls
Hi Manoj,
On the higher end you will not find much difference, if your using this functions over a string.
you will find the difference when you have two different formats i.e. Number and string
date(DATE) AS date > date function is to format the date according to required format
Eg date('26-06-1990','DD MMM, YYYY') gives 26 Jun, 1990
if u just give date(DATE) > it will give u the default format specified in the Qlikview.
Date#() - are string-to-number conversions, i.e. the input is a string that
contains a date and the function creates a correct date serial number. The output is a dual
field, i.e. both string and number
Please go through the attachment.
Regards,
@vi
See the attachment
here
your DATE field treated as string
1)Date# converts it to number .
2)Date function doesn't treat it so, gives you null but if you fetch this DATE field data from Excel or any data source then it treated as number,
//ly if you directly made for this string DATE field to month and year QV treated it as null because QV doesn't know in which format it is but when using Date# fucntion then it gives you Month and year both.
one more thing here you use two format for date in one field so, in date# interpret it as number for all only Mar field treated as string because Qlikview didn't understand in which format it is so, gives you same but date function hide it as treated null.
hope it helps