Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello....My Sample Data Is...
Empid | Date |
---|---|
1216 | 01/01/2011 |
1217 | 05/02/2011 |
1218 | 10/05/2012 |
1219 | 15/08/2012 |
1220 | 22/02/2016 |
I Want Output Like This....
Empid | Header 2 |
---|---|
1216 | Jan-2011 |
1217 | Jan-2011 |
1218 | May-2012 |
1219 | Aug-2012 |
1220 | Feb-2016 |
Use a date() function:
date(fieldname, 'MMM-YYYY')
May be try this:
LOAD Empid,
Date(Date#(Date, 'DD/MM/YYYY'), 'MMM-YYYY') as Date
FROM Source;
Sample Script:
SET DateFormat='DD/MM/YYYY';
SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';
Table:
LOAD Empid,
Date(Date, 'MMM-YYYY') as DateOption1,
MonthName(Date) as DateOption2
FROM
[https://community.qlik.com/thread/206460]
(html, codepage is 1252, embedded labels, table is @1);
LOAD
EmpId,
Date,
Date(MonthStart(Date#(Date,'DD/MM/YYYY')),'MMM/YYYY') as Month
FROM yourdata;
Tq All
Please flag the Correct Answer and optional Helpful Answers. Thank you.