Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Day format in DateFormat

Hi everyone,

I checked in previous discussions but didn't find the answer to my question.

I would like to set my DateFormat to have, for example: Monday, September 11.

I already tried 'DDDD, MMMM DD', 'EEEE, MMM DD' that work in some other applications, but I don't know how to do that on Qlikview.

Anybody has an idea?

Thanks in advance,

benetche

1 Solution

Accepted Solutions
swuehl
MVP
MVP

In your script, use:

SET LongDayNames='Monday;Tuesday;Wednesday;Thursday;Friday;Saturday;Sunday';

Then format your date like
Date(DATEFIELD, 'WWWW, MMMM DD')

Hope this helps,

Stefan

View solution in original post

6 Replies
swuehl
MVP
MVP

In your script, use:

SET LongDayNames='Monday;Tuesday;Wednesday;Thursday;Friday;Saturday;Sunday';

Then format your date like
Date(DATEFIELD, 'WWWW, MMMM DD')

Hope this helps,

Stefan

Not applicable
Author

Thanks Stefan, it works fine.

I just have an additional question due to the result I have: I set the DayNames, MonthNames etc. in English, but the result is in French. Do you have any idea where it comes from? What setting should I change to obtain my final date in English?

swuehl
MVP
MVP

Not really...

I think if your SET variables are not correctly recognized by QV, the OS environment settings are used. Are you working on french OS?

Not applicable
Author

Yes, I'm working on french OS.

Aren't these SET correct?

     SET ThousandSep=' ';

     SET DecimalSep=',';

     SET MoneyThousandSep=' ';

     SET MoneyDecimalSep=',';

     SET MoneyFormat='# ##0,00 €;-# ##0,00 €';

     SET TimeFormat='hh:mm:ss';

     SET DateFormat='WWWW,MMMM D';

     SET TimestampFormat='DD/MM/YYYY hh:mm:ss[.fff]';

     SET      MonthNames='January;February;March;April;May;June;July;August;September;October;November;December';

     SET DayNames='Monday;Tuesday;Wednesday;Thursday;Friday;Saturday;Sunday';

Before I put what you told me (WWWW for the day name in DateFormat), I had something wrong for it but my months were in English, as set in MontNames. But now it returns it in French instead. So I assume what I tell me is true, but it means that Qlikview has a hard time with the DateFormat 'WWWW, MMMM D'?

Kind of a big deal since I need this date format and I need it in English (have to compare the string).

swuehl
MVP
MVP

Well I think 'WWWW' format is querying LongDayNames not DayNames.

Try a

SET LongDayNames='Monday;Tuesday;Wednesday;Thursday;Friday;Saturday;Sunday';

edit: and use LongMonthNames instead of MonthNames (or both for short and long names).

Not applicable
Author

Perfect!! I had to do the same for MonthNames --> LongMonthNames also, and it works perfect now.

Thanks a lot Stefan.