Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dynamic date period Selection by using Macro's(VBscript)?

Hi all,

I have a requirement like as,i have a dash board in that i have DATE PERIOD,one Strait table,and two more table are there.So i have selected a date from DATE PERIOD(1/05/2015-12/05/2015) by manually meanwhile the data will be filtered.Once the filtering done it goes to excel automatically because already macro's were written for this .

1) However i want to select this dates dynamically not by manually,it means if the tomorrow's date will be 24/05/2015 then i want to select this date by dynamically and that too i have to write by using macro's.

2) After that i have to attach this filtered data which was exported to excel report to a mail for sending to another mail by using macro's only.

Kindly help me on this,



Tags (1)
1 Reply
MVP & Luminary
MVP & Luminary

Re: Dynamic date period Selection by using Macro's(VBscript)?

You could simply use date to return the current date and then select your field:

ActiveDocuments.Fields("Date").Select date

Maybe you need some adjustment to the format from date. Unfortunately is vbscript by formatting not very flexible so that often combined date-parts will be needed, like: day(date) & "/" & month(date) ... Easier could be to use numeric field-variants for this and then: cdbl(date).

- Marcus