Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, Can anyone tell me what is wrong with this script please?
let vQVDPath = 'C:\Users\User1\Desktop\';
let vToday = date(today(),'DD/MM/YYYY');
let vQVD_Date = date(QvdCreateTime('$(vQVDPath)TestQVD.QVD'),'DD/MM/YYYY') ; \\ only added to confirm date
if date(QvdCreateTime('$(vQVDPath)TestQVD.QVD'),'DD/MM/YYYY') = $(vToday) then
SET vResult = Yes;
ELSE
SET vResult = No;
ENDIF;
I am trying to compare todays date with the save time of the QVD, if the date matches then output YES otherwise output NO.
It seems to output NO even though the dates match (as seen below..
Many thanks in advance
Hey,
I think the QvdCreateTime() function will return a timestamp, so try and wrap it in the left() function..
if left(date(QvdCreateTime('$(vQVDPath)TestQVD.QVD'),'DD/MM/YYYY'),10) = '$(vToday)' then
I think that should work.
Cheers
Hi,
Try changing your if to:
if date(QvdCreateTime('$(vQVDPath)TestQVD.QVD'),'DD/MM/YYYY') = '$(vToday)' then
(put single quotes on vToday)
Hi, thanks for your reply.
Unfortunately, single quotes didn't fix it either.
I have attached the QVW i am using.
Hey,
I think the QvdCreateTime() function will return a timestamp, so try and wrap it in the left() function..
if left(date(QvdCreateTime('$(vQVDPath)TestQVD.QVD'),'DD/MM/YYYY'),10) = '$(vToday)' then
I think that should work.
Cheers
Fantastic, that is working.
Thanks!