Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to use the date: now() + 06:00. This means: The current data at six o' clock in the morning.
The used database is Microsoft SQL Server.
Newest version of Qlikview 12.
ODBC CONNECT TO data (XUserId is GbYAeHRICaQeFXRODLZA, XPassword is eGXUQGVORJNQEaVMUBQCA);
LET DateNow = Timestamp(text(Date(Now( ), 'yyyy/mm/dd ')) && ’06:00:00’,’yyyy/mm/dd hh24:mm/ss’);
SQL SELECT Customer
FROM DepotSoftware.dbo.tblCustomer
WHERE DateOut > '$(DateNow)'
Does this work?
Can you use DateNow as startup parameter of the report?
Thank you,
Toon Schilder
Your LET statement defining the variable shows some issues (syntax, format codes) and should return an error when executed.
You can do it like
LET DateNow = Timestamp(floor(Now(1))+Time#('06:00','hh:mm'),'YYYY/MM/DD hh:mm:ss');
or
LET DateNow = Timestamp(Daystart(Now(1),0,0.25),'YYYY/MM/DD hh:mm:ss');
That sounds very good. I will try that.
In stead of using Now(1) I guess it's also possible to use a parameter when starting up the report?
Is it easy to default this parameter to today?
Shouldn't the date format be set like this:
SET TimestampFormat='YYYY/MM/DD hh:mm:ss[.fff]';
another one:
LET DateNow = Timestamp(Today()+'06:00','YYYY/MM/DD hh:mm/ss');
hope this helps
regards
Marco