Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a log file and reading the data.
my aim is to get time taken for execution.I am able to read the data.But not able to calculate the difference.
I am attaching QVW.
Thanks in advance.
Chiru
=(date(max(date#(QVWLoadTime, 'MM/DD/YYYY hh:mm:ss')), 'MM/DD/YYYY hh:mm:ss')) - (date(min(date#(QVWLoadTime, 'MM/DD/YYYY hh:mm:ss')), 'MM/DD/YYYY hh:mm:ss'))
That expression will give you the difference. The way that you were doing it on your example just said max(QVWLoadTime), but qlikview wasn't told how to interpret the value of that string. So the date# is an interpreter function that tells qlikview what each number in the field means and thus is able to determine the min and max via the functions. Hopefully this is what you were looking for or at least points you in the right direction.
=(date(max(date#(QVWLoadTime, 'MM/DD/YYYY hh:mm:ss')), 'MM/DD/YYYY hh:mm:ss')) - (date(min(date#(QVWLoadTime, 'MM/DD/YYYY hh:mm:ss')), 'MM/DD/YYYY hh:mm:ss'))
That expression will give you the difference. The way that you were doing it on your example just said max(QVWLoadTime), but qlikview wasn't told how to interpret the value of that string. So the date# is an interpreter function that tells qlikview what each number in the field means and thus is able to determine the min and max via the functions. Hopefully this is what you were looking for or at least points you in the right direction.
hey Chiranjeevi,
I believe its as a string and not as a dual date. It has only the string part and the number part is not associated with it.
To test it just select one and in a text box put num(QVWLoadTime). If you get a number then its dual else its only as a string.
You have to change the format using date#() function.
Date#(QVWLoadTime,'MM/DD/YYYY hh:mm:ss')
Hope it helps
Thanks
AJ