Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
i have made one date format with my date i.e. DD/MM/YYYY.
i simply made Dual(week,week) as Week
and when i m doing Today(week) it is giving me M/DD/YYYY format. how i can do in that format DD/MM/YYYY.
and when i m doing today(week) it should give me current week like 14,or 15 etc.
thanks
I guess you want week(today()), not the today(week)
see this,
try with week() within of script
Beck
Hi,
I guess you are looking for the start date of the current week.
If so, then one solution could be;
WeekStart(Today())
hope this helps
regards
Marco
As a good starting point I would advise on making sure your date format variables are accurately set, with the intended format in your application.
SET DateFormat='DD/MM/YYYY';
SET TimestampFormat='DD/MM/YYYY hh:mm:ss';
The Today() function is expected to return today's date, of the time when the function is called. The format will be according to the format variables.
When working with dates and times I would strongly suggest looking in the "Date and Time functions" section of the Qlik View Help or reference manual. This gives you insight to the available functions and shows simple examples on how they work.
The find the week number I would typically use the Week() function.
Week(MyDate)
Sometimes I want it to have a leading zero for one digit weeks, then I adjust the visual format with the Num() function.
Num(Week(MyDate), '00')
In the examples above MyDate is the field that contains a date value.