Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
abhaysingh
Specialist II
Specialist II

Week Format

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

6 Replies
Anonymous
Not applicable

I guess you want week(today()), not the today(week)

sunny_talwar

  • Try Date(Today(week), 'DD/MM/YYYY')
  • Try Week(Today()) (I guess, from what I am understanding) to get week count. The example will give you 18.
buzzy996
Master II
Master II

see this,wtoday.PNG

beck_bakytbek
Master
Master

try with week() within of script

Beck

MarcoWedel

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

ToniKautto
Employee
Employee

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.