Bingo, this did it for me. My code was exactly like the above. Didn't work. But when I switched LET to SET, it worked. IMHO, this is a POS coding syntax. Qlik makes easy things very hard.
The documentation says SET does assignment without calculation. That is, SET assigns a literal. But I have a function call on the right side of the equals sign. In my book that amounts to a calculation. E.g., A + B is a calculation SUM(A, B) would likewise be a calculation.
But, apparently, Qlik doesn't see it that way.
SET v_QVD_last_update = QVDCREATETIME('lib://QVD_Extract\f_qlik_load.qvd'); puts the time into the variable.
LET v_QVD_last_update = QVDCREATETIME('lib://QVD_Extract\f_qlik_load.qvd'); causes an error when I try to look at the time.
The error occurred here:
data_load: LOAD *,
2019-08-01 >>>>>>12<<<<<<:03:13 AS QVD_last_update