Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
akpofureenughwu
Creator III
Creator III

Date Scripting

Greetings evening,

Please I need assistance in creating the day function on this date script.

load*,

'Q'&ceil(month(date#([Month],'MMM'))/3) as [Quarter],

Date(Date#(Month&'-'&Year, 'MMM-YYYY'), 'MMM-YYYY') as Date;

load

.....................................................

[Fiscal year/period - Fiscal year/period Level 01 (Key)],

    [Fiscal year/period - Fiscal year/period Level 01 (Text)],

     right([Fiscal year/period - Fiscal year/period Level 01 (Text)],4) as Year,

     Capitalize(    If(Index('SP1,SP2,SP3,SP4,Per,', left([Fiscal year/period - Fiscal year/period Level 01 (Text)],3)),'DEC', left([Fiscal year/period - Fiscal year/period Level 01 (Text)],3))) As [Month];

With the above script, I can only generate year, quarter, month, date

I need the day function.

Thank you for viewing this

Regards

1 Solution

Accepted Solutions
MarcoWedel

maybe like this:

load *,

      Day(Date) as Day;

load*,

'Q'&ceil(month(date#([Month],'MMM'))/3) as [Quarter],

Date(Date#(Month&'-'&Year, 'MMM-YYYY'), 'MMM-YYYY') as Date;

load

.....................................................

[Fiscal year/period - Fiscal year/period Level 01 (Key)],

    [Fiscal year/period - Fiscal year/period Level 01 (Text)],

    right([Fiscal year/period - Fiscal year/period Level 01 (Text)],4) as Year,

    Capitalize(    If(Index('SP1,SP2,SP3,SP4,Per,', left([Fiscal year/period - Fiscal year/period Level 01 (Text)],3)),'DEC', left([Fiscal year/period - Fiscal year/period Level 01 (Text)],3))) As [Month];

hope this helps

regards

Marco

View solution in original post

3 Replies
its_anandrjs

Please provide some sample data to look over.

Regards

Anand

johnw
Champion III
Champion III

The day of the month? Maybe this?

day(date#(Month&Year,'MMMYYYY')) as [Day of Month]

MarcoWedel

maybe like this:

load *,

      Day(Date) as Day;

load*,

'Q'&ceil(month(date#([Month],'MMM'))/3) as [Quarter],

Date(Date#(Month&'-'&Year, 'MMM-YYYY'), 'MMM-YYYY') as Date;

load

.....................................................

[Fiscal year/period - Fiscal year/period Level 01 (Key)],

    [Fiscal year/period - Fiscal year/period Level 01 (Text)],

    right([Fiscal year/period - Fiscal year/period Level 01 (Text)],4) as Year,

    Capitalize(    If(Index('SP1,SP2,SP3,SP4,Per,', left([Fiscal year/period - Fiscal year/period Level 01 (Text)],3)),'DEC', left([Fiscal year/period - Fiscal year/period Level 01 (Text)],3))) As [Month];

hope this helps

regards

Marco