Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How can I caluclated in qlikview a date ??
How to achieve this ??
I have a fieldname batch_expiry = 2013/06/12
I have another field days like 60,90,30
I have to subtract 2013/06/12 - 60 and get the date ??
The answer should be 2013/04/12
Hi
If your date is a normal QV date field, then the date is just a number, so you can do
=Date(Batch_Expiry - 60)
The Date() function ensures that the result still shows in date format, rather than number format
Hope that helps
Jonathan
To add a number of days, transform your date to numeric format: num(myDate) and subtract the quantity; at the end transforma again in date:
Date(num(myDate)-30)
Hope it helps
Does Qlikview recognize your datefield (batch_expiry) as date? You can check that by creating a listbox and changing the number format to integer ...
If not, you will have to convert your date field in the script:
date(date#(batch_expiry,'YYYY/MM/DD'),'YYYY/MM/DD') as batch_expiry
For further information on date fields, see Henric Cronströms Technical Brief: http://www.qlikcommunity.com/docs/DOC-3102
Regards,
Florian
try this in text object
=Date(Date#('2013/06/12','YYYY/MM/DD')-60,'YYYY/MM/DD')
Hi Jonathan
Can you please look at this
http://community.qlik.com/thread/101146?start=0&tstart=0
http://community.qlik.com/message/434149#434149
Please find the solution given below:-
Regards
Vineet
Please stop refering to your own post in other topics. They will get answered if someone got an solution
What Jonathan is saying is 100 % correct i have also tested it.
anant
Yes vineet is correct