Qlik Community

Ask a Question

New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

Convert String "Mon" to Date "Mon".

Hi,

This is my first post, do let me know if i am doing anything wrong.

Need some help. on converting String "Mon" to Date "Mon".

Those in Yellow is the expected result.

These are data from another table.  created using 'weekday(@3) As Weekday' (Not sure why these rows are showing in this table)

The red circle are string/text, which need to be converted into Date. so my list Box will show a single set of Mon- Fri.

These does not work. it is missing something, which i cant figure out

     weekday(Date(Date#(Weekday,'WWW')),'WWW') as Weekday,

     Date(Date#(Weekday,'DDD'),'WWW') as Weekday,

     Date#(Weekday,'WWW') as Weekday,

Capture.JPG  Capture.JPG

Thanks for looking at this..

appreciate your thoughts on this.

1 Solution

Accepted Solutions

May be using Dual function

Dual(Weekday, Match(Weekday, 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'))

View solution in original post

6 Replies

May be using Dual function

Dual(Weekday, Match(Weekday, 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'))

View solution in original post

Partner
Partner

Does @3 is a Date?, ie. 27/03/2018 (DD/MM/YYYY). Just to clarify, the values marked with yellow have an underlying value of a date, on my example WeekDay('27/03/2018') returns 'Tue' with an underlying value of '27/03/2018'. So to convert 'Fri' to date 'Fri', you need a date in the format I mentioned.

Regards

Master III
Master III

WeekDay(Pick(Match(YourField,'Mon','Tue','Wed','Thu','Fri','Sat','Sun'),0,1,2,3,4,5,6))

Contributor III
Contributor III

Thanks,

It worked too.

however i will stick with Sunny's. it is cleaner

Contributor III
Contributor III

Thanks. It works.

Contributor III
Contributor III

Hi, the @3 are dates.

thanks for your time.

the above and below solution meets my needs.