Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Converting a date and time to a day of the week

Good afternoon,

Brand new to Qlik so please be gentle with me.

I need to convert a date which is currently in the format 13 Dec 2016 19:30 to a day of the week.

In the example above I would want an output of Tue

Many thanks

Phil

1 Solution

Accepted Solutions
Anil_Babu_Samineni

Try this

=WeekDay(Date(Date#('13 Dec 2016 19:30','DD MMM YYYY hh:mm'),'DD'))

Or

=WeekDay(Date(Date#(DateField,'DD MMM YYYY hh:mm'),'DD'))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

3 Replies
sunny_talwar

May be this

WeekDay(DateField)

or if Date is not properly understood by QlikView, then this

WeekDay(TimeStamp#(DateField, 'DD MMM YYYY hh:mm'))

Here TimeStamp#() is used to help Qlik understand what format is your Date is in.... Look here for more details on this topic

QlikView Date fields

Get the Dates Right

Why don’t my dates work?

Anil_Babu_Samineni

Try this

=WeekDay(Date(Date#('13 Dec 2016 19:30','DD MMM YYYY hh:mm'),'DD'))

Or

=WeekDay(Date(Date#(DateField,'DD MMM YYYY hh:mm'),'DD'))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Not applicable
Author

Many thanks Sunny and Anil, that has sorted it for me.