Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a script where I need to enter the current year and week as fields. The problem is that I need to enter the current week as two digits (08, 09, 10, 11 etc), but now it enters the week as 8, 9, 10, 11 so the end result for this week is 20181 and not 201801.
Is there any way to set the week standard value as XX and not X?
My script now:
vWeek=Year(now())&week((now()))
AUTOSTOCK:
LOAD
DEAL AS [DEALER],
PRIS AS PRICE,
$(vWeek) AS Week;
SQL SELECT *
FROM ......
Thank you
Try like:
vWeek=Year(now())& Num( week((now())), '00')
Hi,
vWeek=Year(now())&Num(week((now())),'00')
or
vWeek=Year(now())&Num(week(now()),'00')
Thank you for the quick response. It worked like a charm!
Do you also know if it is possible to write it as last week so it shows 201752? That is current week minus 1 week.
This?
vWeek=Year(now())& Num( week((Today()-7)), '00')
A better solution could be: =Purgechar(Weekname(today(),-1),'/')
Beautiful! Works like a charm.
Thank you very much!