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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
dmxmikey
Creator
Creator

date to return a number

I have dates  where i need to return the number of the day ie

17/09/18 to return 1

18/09/18 to return 2

19/09/18 to return 3

20/09/18 to return 4

21/09/18 to return 5

22/09/18 to return 6

23/09/18 to return 7

24/09/18 to return 1  etc

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Perhaps: Weekday(MyDateField)+1


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Perhaps: Weekday(MyDateField)+1


talk is cheap, supply exceeds demand
vishsaggi
Champion III
Champion III

Try this?

DateMap:

MAPPING LOAD * INLINE [

WeekDayName, ID

Mon,1

Tue,2

Wed,3

Thu,4

Fri,5

Sat,6

Sun,7

];

MapDates:

LOAD *,

     ApplyMap('DateMap',Text(WeekDay(Date#(Date2, 'DD/MM/YY')))) AS Day

     INLINE [

Date2

17/09/18

18/09/18

19/09/18

20/09/18

21/09/18

22/09/18

23/09/18

24/09/18

25/09/18

];