Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
apoorvasd
Creator II
Creator II

Need help on date format

Hello Everyone,

I need help in getting the desired date format in my QV application. I have created a date field in my script using the below code

Date(WeekStart(today())-2,'MMM DD, YYYY'), this would give me the previous Friday date. The format that I want this date to be in is,

MMM DD, YYYY (ex., Aug 24, 2018). I am able to see this format in my straight table. But when I export the table to excel file, the format changes (to 8/24/2018) but, I want to have the same format when exported to excel file too. How can I change my code to fit in this format?

Any help on this?Date format.PNG

Thank you.

1 Solution

Accepted Solutions
tamilarasu
Champion
Champion

Try,

Text(Date(WeekStart(today())-2,'MMM DD, YYYY'))

View solution in original post

5 Replies
tamilarasu
Champion
Champion

Try,

Text(Date(WeekStart(today())-2,'MMM DD, YYYY'))

apoorvasd
Creator II
Creator II
Author

Hello,

Works! Thank you.

Small clarification, this field will not be recognized as date and would be interpreted just as a normal text, is that right?

tamilarasu
Champion
Champion

Yes. We are converting the date into text format in QlikView. Excel will treat this as text format like other text fields. You can check this after exporting it into excel.

Capture.PNG

apoorvasd
Creator II
Creator II
Author

Okay, thank you.

tamilarasu
Champion
Champion

No problem. Have a good day!