Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a date field in my Qlikview report of the format 2009-12-07 23:26:09.
I am launching an external application via a button macro that requires a start date/time and end date/time and I would like to pass the current filtered date/time range in the format:
from_date=YYYY.MM.DD
from_time=HH:MM
Is there a way to extract the currently active date/time start and end range from the report using a VBScript macro?
Thanks!
Sandy
Sorry - I have found my own answer.
sub UTEL
Dim utelimsi
Dim mindate
DIm mintime
Dim maxdate
Dim maxtime
utelimsi = ActiveDocument.Evaluate("imsi")
mindate = ActiveDocument.Evaluate("date(min(date),'YYYY.MM.DD')")
maxdate = ActiveDocument.Evaluate("date(max(date),'YYYY.MM.DD')")
mintime = ActiveDocument.Evaluate("time(min(date),'HH')")
maxtime = ActiveDocument.Evaluate("time(max(date),'HH')")
set WshShell = CreateObject("WScript.Shell")
WshShell.Run "iexplore.exe http://10.0.1.98/cgi-bin/uqos/tcapsearch.pl??Action=Search&Category=TCAP&From_Date="&mindate&"&From_Time="&mintime&":00&To_Date="&maxdate&"&To_Time="&maxtime&":59&Field=imsi&Operator=&Value=&bind1=and&Sub=&bind2=and&Expression=((imsi="&utelimsi&"))&Button=View",3,true
end sub
Sorry - I have found my own answer.
sub UTEL
Dim utelimsi
Dim mindate
DIm mintime
Dim maxdate
Dim maxtime
utelimsi = ActiveDocument.Evaluate("imsi")
mindate = ActiveDocument.Evaluate("date(min(date),'YYYY.MM.DD')")
maxdate = ActiveDocument.Evaluate("date(max(date),'YYYY.MM.DD')")
mintime = ActiveDocument.Evaluate("time(min(date),'HH')")
maxtime = ActiveDocument.Evaluate("time(max(date),'HH')")
set WshShell = CreateObject("WScript.Shell")
WshShell.Run "iexplore.exe http://10.0.1.98/cgi-bin/uqos/tcapsearch.pl??Action=Search&Category=TCAP&From_Date="&mindate&"&From_Time="&mintime&":00&To_Date="&maxdate&"&To_Time="&maxtime&":59&Field=imsi&Operator=&Value=&bind1=and&Sub=&bind2=and&Expression=((imsi="&utelimsi&"))&Button=View",3,true
end sub