Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying capture the date of the file I'm loading into Qlik and assigning the value to a variable to be added to a dashboard.
Set $File_Date = FileTime("\\path\excel.xlsx")
The text on the object property is set to:
='Last Updated'&$File_Date
What's printing in the object box on the dashboard is:
Last Updated FileTime("\\path\excel.xlsx")
It seems so simple, but I'm new to Qlik and can't this out. Thanks for any help!
Trista
Thank you all for your prompt responses!
This is what worked.....
Script:
LET $v_File_Date = FileTime('\\path\excel.xlsx');
I didn't realize I had to end it with a semi-colon ';'.
I'm assuming prefixing with "v_", is best practice for Qlik variables...
Then in object text box:
= 'Last Updated' & $v_File_Date
The result also included both the date and time. I was looking for just the date. But, this will do.
Last Updated
1/23/2017 9:31:25 AM
[Stefan]
You can get only the date part using e.g. Dayname():
LET $v_File_Date = DayName(FileTime('\\path\excel.xlsx'));
Result:
Last Updated
1/23/2017
THANK YOU ALL!!
Try
='Last Updated'& $(File_Date)
Or
='Last Updated'& '$(File_Date)'
Try this may be:
Set $File_Date = FileTime('\\path\excel.xlsx')
='Last Updated' & $($File_Date)
Try with LET:
LET v_File_Date = FileTime('\\path\excel.xlsx');
Then in a text box:
= 'File time: ' & v_File_Date
Hi Trista,
Have you to put value in Variable?
You had used filetime(), if you want to use this You should Use LET Variable.
LET $File_Date = FileTime('\\path\excel.xlsx')
='Last Updated' & $($File_Date)
Regards
Sathish
Thank you all for your prompt responses!
This is what worked.....
Script:
LET $v_File_Date = FileTime('\\path\excel.xlsx');
I didn't realize I had to end it with a semi-colon ';'.
I'm assuming prefixing with "v_", is best practice for Qlik variables...
Then in object text box:
= 'Last Updated' & $v_File_Date
The result also included both the date and time. I was looking for just the date. But, this will do.
Last Updated
1/23/2017 9:31:25 AM
[Stefan]
You can get only the date part using e.g. Dayname():
LET $v_File_Date = DayName(FileTime('\\path\excel.xlsx'));
Result:
Last Updated
1/23/2017
THANK YOU ALL!!
You can get only the date part using e.g. Dayname():
LET $v_File_Date = DayName(FileTime('\\path\excel.xlsx'));
If your request is resolved, then please close this thread by flagging helpful and/ or correct answers.
Perfect Stefan! Thank you!