Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
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,

Regards,

Chirumamilla

1 Reply
marcus_sommer

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