
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Qlik Sense colleagues - Month Year format
ANY Hello,
I am trying to get a month year format here into my script with no luck - any help is greatly appreciated.
SET ThousandSep=',';
SET DecimalSep='.';
SET MoneyThousandSep=',';
SET MoneyDecimalSep='.';
SET MoneyFormat='$#,##0.00;-$#,##0.00';
SET TimeFormat='h:mm TT';
SET DateFormat='DD/MMM/YYYY';
SET TimestampFormat='DD/MMM/YYYY h:mm[.fff] TT';
SET FirstWeekDay=6;
SET BrokenWeeks=1;
SET ReferenceDay=0;
SET FirstMonthOfYear=1;
SET CollationLocale='en-AU';
SET CreateSearchIndexOnReload=1;
SET MonthNames='Jan.;Feb.;Mar.;Apr.;May;Jun.;Jul.;Aug.;Sep.;Oct.;Nov.;Dec.';
SET LongMonthNames='January;February;March;April;May;June;July;August;September;October;November;December';
SET DayNames='Mon.;Tue.;Wed.;Thu.;Fri.;Sat.;Sun.';
SET LongDayNames='Monday;Tuesday;Wednesday;Thursday;Friday;Saturday;Sunday';
LOAD
//"Arrival Date",
Weekday("Arrival Date"),
Date (makedate("Arrival Date"), 'YYYY') as ArrivalYear,
Date (makedate ("Arrival Date"),'MMM') as ArrivalMonth,
//Date(makedate("Arrival Date"),'MMM-YYYY') as MonthYear,
"Arrival Time",
//"Arrival Month Year",
UniqueID,
Hospital,
ArrivalCode,
ArrivalDesc,
PatPostCode,
PatSuburb,
"Age",
ED_DepartureStatusDesc
FROM [lib://AttachedFiles/De-identified data (002).xlsx]
(ooxml, embedded labels, table is Sheet1);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
try this
Date(monthstart(("Arrival Date"), 'MMM-YY') as MonthYear

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Date(monthstart(("Arrival Date"), 'MMM-YYYY') as MonthYear
or
date(MonthStart(date#(Datefield,'DD/MM/YYYY')),'MMM-YYYY') as MonthYear
Note: DD/MM/YYYY this you need to give your datefield format


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is a function that could do this:
MonthName (datefield) as MonthYear
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How is your date field originally formatted?
Try the syntax below, taken from the built in autocalendar:
Dual(Year("Arrival Date")&'-'&Month("Arrival Date"), Monthstart("Arrival Date")) AS [ArrivalYearMonth]
